Focal Point
DateCvt not working after upgrade 7.6.7 from 5.3

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

February 08, 2009, 02:14 PM
hj
DateCvt not working after upgrade 7.6.7 from 5.3
I have an input file and am using DATECVT to extract month, day and year
CREATE_MONTH etc. no longer returns correct data after upgrade.
Any help



DEFINE FILE RS_NET_ALL
CREATE_MONTH/M = DATECVT(CREATE_DATE, 'MDYY', 'M');
CREATE_DAY/D= DATECVT (CREATE_DATE , 'MDYY', 'D' );
CREATE_YEAR/YY = DATECVT (CREATE_DATE, 'MDYY', 'YY');
CREATE_MYY/MYY = DATECVT (CREATE_DATE, 'MDYY', 'MYY');
February 08, 2009, 03:07 PM
FrankDutch
I wonder if this worked before the upgrade.

As far as I know DATECVT converts p.e. I8YYMD to YYMD so

NEWDATE/YYMD=DATECVT('&LETTING','A6MDY','YYMD');

Once you have converted it to a smartdate the next step might be

CREATEMONTH/M=NEWDATE;
etc




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

February 09, 2009, 02:05 AM
Tony A
According to documentation the syntax is correct, so call it in and raise a case with tech support on InfoResponse, after first double checking to make sure that your input file isn't the cause.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 09, 2009, 04:10 AM
FrankDutch
[Tony is right, and for me this works, but to be honest I found some strange thing too

The field LSTDAT is a smartdate field formatted DMYY.
As you can see it does not matter what format I give in the input field for this formula.

But in this case also the formula

NEWD/D=LSTDAT would give me the correct result.


DEFINE FILE CLIFON
CREATE_MONTH/M = DATECVT(LSTDAT, 'MDYY', 'M');
CREATE_DAY/D= DATECVT (LSTDAT , 'DMYY', 'D' );
CREATE_YEAR/YY = DATECVT (LSTDAT, 'MDYY', 'YY');
CREATE_MYY/MYY = DATECVT (LSTDAT, 'YYMD', 'MYY');
END
TABLE FILE CLIFON
PRINT
     STOCKID
     LSTDAT
	 CREATE_MONTH
CREATE_DAY
CREATE_YEAR
CREATE_MYY


gives me this

STOCKID LSTDAT     CREATE_MONTH CREATE_DAY CREATE_YEAR CREATE_MYY 
302630  11/04/2008 04           11          2008        04/2008 
924000  27/01/2009 01           27          2009        01/2009 





Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7