April 19, 2020, 09:59 PM
nox[CLOSED] how DATECVT work?
Hi,
I have following sample code in .fex file:
-SET &YYMD = '20180314';
-SET &MY_YYQ = DATECVT(&YYMD,'I8YYMD','YYMD') ;
-TYPE --------------------------
-TYPE YYMD ----- &YYMD
-TYPE MY_YYQ --- &MY_YYQ
-TYPE --------------------------
RUN
EXIT
and my result:
--------------------------
YYMD ----- 20180314
MY_YYQ --- 42807
--------------------------
can someone explain where/how does '42807' come from?
This message has been edited. Last edited by: nox, April 19, 2020, 10:07 PM
WazFormat YYMD is a "Smart Date" and it effectively the number of days since 1970, if memory serves
April 20, 2020, 09:48 AM
kccharliethe value returned for format YYMD is the number of days since the base date - 12/31/1900 I think. the 1970 base is for dates in Unix
April 20, 2020, 10:02 AM
dbeaganHere's a post with an example of how you might use DATECVT:
how DATECVT work?