IBI Focus/WebFocus Smart Date Quick Reference Guide :

Date Format Separators:

YMD     - yy/mm/dd
Y|M|D  - yymmdd
YBMBD  - yy mm dd
Y-M-D  - yy-mm-dd
Y/M/D  - yy/mm/dd etc..

Smart Date Format Components:

YY    - 19xx - 20xx
Y      - xx
Q      - 1 -> 4
M      - 1 -> 12
MT    - JAN -> DEC
MTR  - JANUARY -> DECEMBER
Mt,tr - Mixed case
JUL   - 1 -> 365 (prefixes 2 char Year by default)
D      - 1 -> 28-31
W     - 1 -> 7 (If used alone, Else MON -> SUN)
w      -  " Mixed case
WT    - MON -> SUN
WTR  - MONDAY -> SUNDAY
Wt,tr -  " Mixed case

Internal smart date integer values:

YMD, YYMD, DMY, DMYY, MDY, MDYY, JUL, YYJUL - nbr. Days from the base date
Y,YY - nbr. Years " " "
YQ    - nbr. Quarters " " "
YM    - nbr. Months " " "
Q      - nbr. Quarters/Year, add/sub in modulo 4 (ie: 3 + 2 = 1)
M      - nbr. Months/Year, add/sub in modulo 12 (ie: 7 + 7 = 2)
D      - nbr. Days/Month add/sub in modulo 28-31 (depending on month)
W     - nbr. Days/Week, add/sub in modulo 7 (ie: 5 + 5 = 3)
JUL   - nbr. Days/Year add/sub in modulo 365-6 (depending on year)

Amper Variable Date Formats:

&DATE - mm/dd/yy
&YMD  - yymmdd &YYMD - yyyymmdd &DATEYYMD - yyyy/mm/dd
&MDY  - mmddyy &MDYY - mmddyyyy &DATEMDYY - mm/dd/yyyy
&DMY  - ddmmyy &DMYY - ddmmyyyy &DATEDMYY - dd/mm/yyyy

Smart Date Functions:

DATEADD(smart_date_field, 'unit', add_integer, *result_fldnm*) ;
The smart date field must have a day component.
*result_fldnm* is for Modify only.
The add_integer can be + or -, to add or subtract.
The units are: Y, M, D, WD (weekday), or BD (business day). 

DATEDIFF(from_date_field, to_date_field, 'unit', *result_fldnm*) ;
Returns an integer value (may be rounded).

DATEMOV(smart_date_field, 'new_point', *result_fldnm*) ;
The new_points are:
BOW, BOM, BOQ, BOY, EOW, EOM, EOQ, EOY, (Begining Of, End Of)
NWD, NBD, PWD, PBD, WD+, BD+, WD-, BD-. (Next, Prior, later, earlier)

DATECVT(smart_date_field, 'input_format', 'output_format', *result_fldnm*) ;
Input is a smart date or literal date(&). 
Output is in an old date, or non-date format.

TODAY(tempfield) ; (/A8 for mm/dd/yy, or, /A10 for mm/dd/yyyy)

Notes:

 

FOCUS Smart Date quick reference  -  Dave Ayers 8/16/99