Does anyone have documentation on formatting dates?

Posted by bcbennett on 26-Sep-2011 16:09

I need to format dates into Month Year, Week ending, etc.  They are used in a report and does not sort well if the date is a character field.  It needs to be a date field.

A document would be helpful.

Thank you,

Cathy

All Replies

Posted by rohit.ramak on 27-Sep-2011 01:09

DEFINE VARIABLE dtMyDate     AS DATE INITIAL TODAY        NO-UNDO.
DEFINE VARIABLE dtSrtOfYear  AS DATE INITIAL 01/01/2011   NO-UNDO.


MESSAGE
    MONTH(dtMyDate) SKIP
    YEAR(dtMyDate)  SKIP
    INTERVAL(dtMyDate,dtSrtOfYear, 'weeks') SKIP
    dtMyDate + (7 - WEEKDAY(dtMyDate))
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

This thread is closed