Using date functions in Dialogue Manager

WebFOCUS Functions can be called from DM (with some restrictions). This allows dates to be manipulated or converted.

There are two types of date functions: Standard and Legacy. Only the Legacy functions (eg: AYMD) are directly compatible with DM. The standard functions can be used, but the date has to be converted to an offset first, then converted back afterwards. Example code (to add 14 days to a date) and output below.


-* DM date example
-SET &OUTDATE = AYMD(2O111012, 14, 'I8');

-SET &OFFSET = DAYMD(2O111012, 'I8');



-SET &OUTDATE = AYMD(2O111012, 14, 'I8');
-TYPE 20111026

-SET &OFFSET = DAYMD(2O111O12, 'I8');
-SET &NEWOFF = DATEADD(40827, 'D', 14);
-SET ENEWDT = DTYMD(40841, 'I8');
-TYPE 20111026



Refer to the Using Functions manual

Calling a Function From a Dialogue Manager Command (p62)
Using Standard Date Functions (p205)
Using Legacy Date Functions (p247)
DA Functions: Converting a Legacy Date to an Integer (p256)
DT Functions: Converting an integer to a Date (p261)





Need help? Let me take care of your IT issues.

Share this page

Share on facebook
Share on linkedin
Share on twitter
Share on print
Share on email
Scroll to Top