Focal Point
[CLOSED] Convert Transform non date into Date

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

May 29, 2018, 03:31 PM
raff
[CLOSED] Convert Transform non date into Date
How do I convert 41618 into 2018/04/16 OR 4/16/18 OR 04/16/2018?

I am using InfoAssist WF 8.02

This message has been edited. Last edited by: FP Mod Chuck,


8.2
May 29, 2018, 03:40 PM
Tomsweb
Can post sample code?


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
May 29, 2018, 03:41 PM
BabakNYC
Is the century always 20 or could it also be 19?
Could the day be single digit the way your month is? For instance, could you have a 4418 as in April 4 2018 or will that look like 40418?


WebFOCUS 8206, Unix, Windows
May 29, 2018, 03:53 PM
Tomsweb
Can't be a JULIAN date


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
May 29, 2018, 05:11 PM
Waz
Whats the format of the date ? is it a string or numeric ?

Is this to be done in a DEFINE or COMPUTE or Dialog Manager ?

Here is a simple example. To cater for other formats of the date, you will need much more logic.

SET DEFCENT = 20

TABLE FILE CAR
 PRINT COMPUTE NON_DATE/A5 = '41618' ;
 COMPUTE TMP_DATE/A6MDY = '0' | NON_DATE ;
 COMPUTE FOC_DATE/MDYY = TMP_DATE ;
 BY COUNTRY NOPRINT
 WHERE RECORDLIMIT EQ 1
END



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!