How to: |
The DATEMOV function moves a date to a significant point on the calendar.
DATEMOV(date, 'move-point')
where:
Date
Is the date to be moved. It must be a full component format date (for example, MDYY or YYJUL).
Alphanumeric
Is the significant point the date is moved to. An invalid point results in a return code of zero. Valid values are:
A business day calculation is affected by the BUSDAYS and HDAY parameter settings.
Note: DATEMOV does not use an output_format; it uses the format of the argument date for the result. As long as the result is a full component date, it can be assigned only to a full component date field or to an integer field.
This example finds the end day of the current date week
DATEDIF('&YYMD', 'EOW')
and returns 20040326 if today is 2004, March 23rd. Note the use of the system variable &YYMD and natural date representation in the first argument.
iWay Software |