Focal Point
Date Format

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3381058331

May 10, 2005, 02:37 PM
Cyril Joy
Date Format
Hello All,

I have some issues with the WebFOCUS date formats.
I have a date field with the format HYYMD.
This returns the date in the format 2005/02/21.
I want a format which will convert this date to the form Feb-2005. ie, the date 2005/02/21 has to be converted to the form Feb-2005(no day). Please help me.
I cannot convert this to an alpha field because basically my requirement is to sort the data by date. If i use alpha field, the sorting will be done alphabetically.

I am using WebFOCUS 5.3.
May 10, 2005, 03:57 PM
k.lane
Cyril,

If you print the date with the format MtYY instead of YYMD, you will get a date in a format similar to what you're looking for.

For instance, today's date would print as

May, 2005.

Ken
May 10, 2005, 04:04 PM
k.lane
Something I forgot to add. If you absolutely need the date in the format of May-2005 (including the dash - ), then you could convert the date to alphanumeric. The trick would be to sort the data by the actual date field first (NOPRINT) and then by the alphanumeric version of the date.

BY DATE_FIELD NOPRINT
BY ALPHA_DATE_FIELD

This would ensure that you sort your data by date but display the format that is required.

Either way would suffice.

Ken
May 10, 2005, 04:05 PM
Prarie
Try this.

DDATE/YYMD = HDATE(ROW_DATE, 'YYMD');
DODATE/MDYY = (DDATE);
DATEE/MtYY = DODATE;
May 11, 2005, 06:19 AM
Cyril Joy
Thanks a lot Lane and Prarie.
The format MtYY worked for me.