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 , June 04, 2018 11:26 AM 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?
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