Midrange Systems Design - IBM iSeries i5
| Calendar & Date conversion - | Download- Program source |
Some times it is the little things that make a program better. This is one of those things. It will pop up a calendar, and highlight the date you passed. You may roll to the next month, or type in a date. It also comes with it own convert date routine, to convert MMDDYY format to YYYYMMDD, and to relative (or serial).
Requirements
CLP Compiler
RPG3 Compiler
DSPF Compiler
CMD Compiler
Installation instructions
1. Transfer to a source file
2. Change the member type to "CL" not clp
3. Setup PDM user option RB - Run Batch DB Job
sbmdbjob file(&L/&F) mbr(&N) jobq(QBATCH)
4. RB next to the source file
If you don't have pdm, type in the command on line 3
Operating Instructions
A. To test
1. Addlible MSD04
2. call AMCALENC
3. call AMCVTDT3C
B. Change your DDS, CL & RPG to call AMCALEN.
This software is copyrighted.
Copyright Steven Easton, 2000
This software is distributed as shareware. The price is FREE.
Midrange Systems Design Inc.
Steven Easton
12701 SE 119
Oklahoma City, Ok 73165
Voice: 405-524-2661
email: support20075-10.com
Calendar
This is also a programming tool. Use it as a popup window for
date fields.
..................................
: Saturday February 23, 1952 :
: Sun Mon Tue Wed Thr Fri Sat :
: 1 2 :
: 3 4 5 6 7 8 9 :
: 10 11 12 13 14 15 16 :
: 17 18 19 20 21 22 23 :
: 24 25 26 27 28 29 :
: :
: Select 2-23-1952 :
: Rollup, Rolldown, F3=Exit :
: :
..................................
Select Select Date
Key in the date in MMDDYY or MMDDYYYY format, press
enter and a calendar for that date will be displayed.
Convert Date
This is a programming tool. You may imbed this function in your programs. You specify what the input date format is, and it converts that date to all formats, MMDDYY, MMDDYYYY, YYMMDD, YYYYMMDD, Relative, and alpha day of week alpha month. Call AMCVTDT3C and the following will be displayed:
Convert dates 8/13/00 15:01:00
Command...... G Y =Date input is yymd or ymd format
G =Date input is mdyy or mdy format Gregorian
R =Date input is relative format
LR=Exit
Date Input.... 81300
Gregorian.mdy 8/13/00
mdyy 8/13/2000
Yr Mo Day.ymd 8-13
yymd 2000-08-13
Relative..... 730,722 # of days since 0000-01-01
Day of week.. Sunday
Month........ August
Day.......... 13
F1=Help, F3=Exit
You can call this date conversion program from your rpg program. Browse in source file CVTDATE3 (RPG3) or CVTDATE4 (RPG4) as an example.
CMD Defines the format of date input.
LR- End program with LR
G - Input MMDDYY or MMDDYYYY
Y - Input YYMMDD or YYYYMMDD
R - Input relative
Date Input Date you supply in any format. CMD defines the format.
Gregorian mdy Date input converted to MMDDYY format.
mdyy Date input converted to MMDDYYYY format
Yr.Mo.Day.ymd Date input converted yymmdd format.
yymd Date input converted yyyymmdd format
REL Date input converted to Relative format
It is the number of days since date 01/01/0000.
- May be used to add & subtract dates
DOWALF Day of Week
Monday, Tuesday, Wednesday, Thursday, Friday,
Saturday, Sunday
MONALF Month of the Year
January, February, March, April, May, June,
July, August, September, October, November, December
DAYALF Day of the month