Focal Point
[CLOSED] date conversion from 'aug-2009' to 200908

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/149102122

August 26, 2009, 03:09 PM
rp
[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
rp

This message has been edited. Last edited by: Kerry,


webfocus 7.6.9 windows XP Excel
August 26, 2009, 03:41 PM
Microfich
Try one of these links:


Date and Time functions

Samples of date usage in WebFOCUS


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
August 26, 2009, 03:57 PM
Francis Mariani
-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