trafford69
New Member
Hi guys,
Can someone show me how to format date(TODAY) to DDMMMYY
(eg. 26MAR05 )? Thanks.

Can someone show me how to format date(TODAY) to DDMMMYY
(eg. 26MAR05 )? Thanks.

I want to see date as 06OCT05, after printing i can see only
6OCT05 the "0" is missing. PLease help.Many Thanks.
This is a startup parameter. You should have a -dmy with the format you require. This effects the WHOLE session of that Progress. Though you could as a work around convert via string.
SESSION:DATE-FORMAT = "dmy".
DEFINE VARIABLE months AS CHARACTER NO-UNDO INIT "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec".
MESSAGE
STRING(DAY(TODAY),'99') + CAPS(ENTRY(MONTH(TODAY),months)) + SUBSTR(STRING(YEAR(TODAY)),3)
VIEW-AS ALERT-BOX INFO BUTTONS OK TITLE "DEBUG".
Hi Guys,Casper said:To get the 0 before the six you just have to put a format phrase in the example bulkodd gave:
e.g.
Code:DEFINE VARIABLE months AS CHARACTER NO-UNDO INIT "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec". MESSAGE STRING(DAY(TODAY),'99') + CAPS(ENTRY(MONTH(TODAY),months)) + SUBSTR(STRING(YEAR(TODAY)),3) VIEW-AS ALERT-BOX INFO BUTTONS OK TITLE "DEBUG".
Casper.