Focal Point
[CLOSED] how DATECVT work?

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

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,


WebFOCUS v8.2.06 , Windows
April 19, 2020, 10:07 PM
Waz
Format YYMD is a "Smart Date" and it effectively the number of days since 1970, if memory serves


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!

April 20, 2020, 09:48 AM
kccharlie
the 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


WF 8201M/8206, Linux & Windows
April 20, 2020, 10:02 AM
dbeagan
Here's a post with an example of how you might use DATECVT:
how DATECVT work?


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF