What is a simple, concise way to convert an alpha field with date values into a date field? The dates values are in the following format with no leading zero on the day number: 1-Aug or 23-Aug. Rather than coding the logic to do it the "long" way (parsing the value, adding the leading zero, etc.), I would prefer something concise. The year can be obtained from a variable.
Thank you,
JohnThis message has been edited. Last edited by: JohnB,
Thanks, Tom. I had checked the documentation before posting this. I was hoping someone had done this before and could provide an example of either one expression with nested functions or just a few defined fields to accomplish this.
WF 7.7.03, Windows 7, HTML, Excel, PDF
October 10, 2009, 03:07 PM
Danny-SRL
John,
This worked for me:
-SET &JB='1 Aug 2009';
DEFINE FILE CAR
DT/DMYY='&JB';
END
TABLE FILE CAR
PRINT DT BY COUNTRY
END
So, if your "date" is '1-Aug' and the year comes from somewhere else, I suggest you replace the hyphen with a space and concatenate the year and you should be home.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF