Formatting dates

tamhas

ProgressTalk.com Sponsor
Do it in two steps. Use string() to format the date into a string and then use substring to pick apart the pieces and create a new string with the formatted date in it. Then display/use the second string.
 

sharkdim

Member
you can use the following script,

string(year(today),"9999") + string(month(today),"99") + string(day(today),"99").
 

taqvia

Member
Date format is basically specified at the installation time that which format will be usedfo storing the date field. but for display purpose on the GUI it is always possible to display in the format you want.

string(year(today),"9999")

Arshad Taqvi
 

sridevi.stalin

New Member
Hi,
there are three place to change your date format,
1. when initialization of progress.
2. if you are maintaining .pf file (parameter file) to run your application
3. you can specify the format of fill-in widget whatever it is.
If you need in the category of no.2,
You may specify in that .pf file
As,
-d ymd
-yr4def
The above two parameters keep your format for every date type field in your application.
And you check you code like,
MESSAGE "Hello your date format is now: " TODAY
VIEW-AS ALERT-BOX INFO BUTTONS OK.

Hi.

I need to format dates in YYYYMMDD, how can I use FORMAT for it ?
Thanks.
 
Top