[CLOSED] date conversion from 'aug-2009' to 200908
Hi, i want to convert 'aug-2009' to '200908'.is there any direct date format for this?
i tried ,like &todate = 'aug-2009'; -SET &todateYEAR = EDIT(&todate,'$$$$9999'); -SET &todateMONTH = EDIT(&todate,'999$$$$$'); --need a conversion function to convert &todateMONTH( OTHER THAN DECODE)
-SET &total =&todateYEAR || &todateMONTH
Thanks rpThis message has been edited. Last edited by: Kerry,
-SET &ECHO=ALL;
-SET &todate = 'aug-2009';
DEFINE FILE CAR
OUTDT/HYYMDI WITH COUNTRY = HINPUT(8,'&todate.EVAL', 8, OUTDT);
END
TABLE FILE CAR
SUM
OUTDT
ON TABLE SAVE AS SAVE01
END
-RUN
-READ SAVE01 &OUTDTYY.A4. &OUTDTM.A2
-SET &total = &OUTDTM || &OUTDTYY
-TYPE &total
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 26, 2009, 04:00 PM
Doug
I'm guessing that the incoming date is from a prompt (manual input, via a GUI) or something, not from a DB, right?
Why would you want to go through all the DM -SET and not use a DECODE at the end? DECODEs are nice... easy to use... and efficient...
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206