I am trying to convert an oracle timestamp into a date and getting an error. My code; DETDATE/MDY=DATECVT(TCMM_RDEFH.TCMM_RDE.DATE_DETECTED, 'HYYMDIA', 'MDY');
Error msg: (FOC36355) INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION DATECVT (FOC36355) INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION DATECVT
I have tried 'HYYMDS' and still get the same error. Does someone know how to fix this or even a different way to convert the timestamp to date.This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6 Windows, All Outputs
July 21, 2011, 12:51 PM
Dan Satchell
I don't believe function DATECVT will work with date-time values. Try function HDATE instead.
WebFOCUS 7.7.05
July 21, 2011, 12:53 PM
Severus.snape
DATECVT will work only with Date format.. for timestamp you have HCNVRT and HDATE
here is an example from the documentation
TABLE FILE VIDEOTR2
PRINT
CUSTID
TRABSDATE AS 'DATE_TIME'
COMPUTE TRANSDATE_DATE/YYMD=HDATE(TRANSDATE,'YYMD');
WHERE DATE EQ 2000;
END
thanks Sashanka
WF 7.7.03/Windows/HTML,PDF,EXL POC/local Dev Studio 7.7.03 & 7.6.11