Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHGDAT in Dialogue Manager

Status
Not open for further replies.

Sean466

Programmer
Mar 27, 2003
12
0
0
CA
Is there a way to get the CHGDAT function to work in DM? I am using WebFocus v4.3.6. When I try the following syntax, I don't get the anticipated output....

-TYPE current date: &DATEYYMD
-SET &FMT_DT = CHGDAT('YYMD', 'DMYYT', &DATEYYMD, 'A17');
-TYPE formatted date: { &FMT_DT }

gives me...

current date: 2004/04/20
formatted date: { }

&FMT_DT is blank.

Any help is appreciated!
 
OK, I got it. I needed to reformat the date to an integer string...

-SET &TMP_DT = EDIT(&DATEYYMD, '9999$99$99');
-SET &FMT_DT = CHGDAT('YYMD', 'DMYYT', &TMP_DT, 'A17');
-TYPE formatted date: { &FMT_DT }

now gives....


current date: 2004/04/20
formatted date: { 20 APR 2004 }
 
Just as an FYI, you could also use &YYMD, instead of &DATEYYMD, to have the current date without the slashes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top