Please enable JavaScript to view this site.
This program will take a date string, in a specified format, add/subtract a specified duration [days, months or years] and pass it back in the same or a different specified format.
| Parameter | In | Len | Out | Len | 
| PARM1 | Input Date String | 50 | Output Date String | 50 | 
| PARM2 | Input Date Format #1 (opt) | 7 | - | 
 | 
| PARM3 | Duration to add/sub #2 (opt) | 3 | - | 
 | 
| PARM4 | Output Date Format #3 (opt) | 7 | - | 
 | 
| PARM5 | Date separator | 1 | - | 
 | 
| PARM6 | Duration Type #4 (opt) | 
 | Error Indicator #5 | 1 | 
Note:
| #1 | If no Input Date Format is specified then *DMY [DD/MM/YY] is assumed. | 
| #2 | If no Duration to add/sub is specified then 1 is assumed. If you wish to subtract a duration from a date then specify a “-“ as the first character of this parameter e.g. “-2” | 
| #3 | If no Output Date Format is specified then Input Date Format is assumed. | 
| #4 | If no Duration Type is specified then D=Days is assumed. D=Days, M=Months or Y=Years | 
| #5 | Error Indicator 0 = Valid | 
Valid Date Format strings
Specifies the valid Date Formats that may be used in either PARM2 or PARM4.
| Format Code | Description | 
| *MDY | The date has the month, day, year format, mmddyy. | 
| *MDYY | The date has the month, day, year format, mmddyyyy. | 
| *DMY | The date has the day, month, year format, ddmmyy. | 
| *DMYY | The date has the day, month, year format, ddmmyyyy. | 
| *YMD | The date has the year, month, day format, yymmdd. | 
| *YYMD | The date has the year, month, day format, yyyymmdd. | 
| *CYMD | The date has the century, year, month, day format, cyymmdd, where c is 0 for years 1928 through 1999 and is 1 for years 2000 through 2071. | 
| *JUL | The date has the Julian format, yyddd. | 
| *ISO | The date has the International Organization for Standardization (ISO) date format, yyyy-mm-dd. | 
| *USA | The date has the United States date format, mm/dd/yyyy. | 
| *EUR | The date has the European date format, dd.mm.yyyy. | 
| *JIS | The date has the Japanese Industrial Standard date format, yyyy-mm-dd. | 
| *LONGJUL | The date has the long Julian format, yyyyddd. | 
Example Date Format
If your date is in the format mm/dd/yy you would specify *MDY as your Input Date Format in PARM2.
 
	