will produce a string representation of your computed date - concatenate to it as needed.This message has been edited. Last edited by: John W Price,
WebFOCUS 8.0.2, FOCUS since 1977 - John@Aviter.com PDF , Excel, FOCUS, Author of the Keysheets and Dates book. www.Aviter.com
June 03, 2013, 10:11 AM
Francis Mariani
You can also use the FPRINT function, much easier than the DATETRAN function:
DEFINE FILE CAR
MYDATE/YYMD WITH COUNTRY = '&YYMD';
END
TABLE FILE CAR
PRINT
COMPUTE DT1/A10 = FPRINT(MYDATE,'YYMD', 'A10');
COMPUTE DT3/A10 = FPRINT(MYDATE,'D.M.YY', 'A10');
COMPUTE DT4/A10 = FPRINT(MYDATE,'M-D-YY', 'A10');
COMPUTE DT5/A20 = FPRINT(MYDATE,'DMtYY', 'A20');
COMPUTE DT2/A20 = FPRINT(MYDATE,'MtrDYY', 'A20');
COMPUTE DT6/A20 = FPRINT(MYDATE,'DMTRYY', 'A20');
COMPUTE DT7/A20 = FPRINT(MYDATE,'wrMtrDYY', 'A20');
COMPUTE DT8/A20 = FPRINT(MYDATE,'WMTDYY', 'A20');
BY COUNTRY
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 03, 2013, 10:13 AM
Francis Mariani
John, Vivian, does the Key Sheet show how to use the FPRINT function with date columns?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 03, 2013, 08:36 PM
John W Price
Francis, No it does not. It shows the input as numeric format. This would work with "legacy dates" but not "Smart Dates" or "Date Time" (WebFOCUS). Looks like I'll have to set up some tests to see what can be done with those data types. Thanks for the heads up. Just checked the FOCUS Keysheet and it indicates any input field. The Dates book does not reference FPRINT at all - looks like I have a lot of work to do.This message has been edited. Last edited by: John W Price,
WebFOCUS 8.0.2, FOCUS since 1977 - John@Aviter.com PDF , Excel, FOCUS, Author of the Keysheets and Dates book. www.Aviter.com
June 04, 2013, 09:21 AM
Francis Mariani
John,
Thanks for looking into this. The IBI documentation on FPRINT is meagre.
Cheers,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 04, 2013, 10:30 AM
Craig R.
Francis:
I, too, like the new FPRINT! Still need DATETRAN sometimes to get rid of those pesky commas. Add these lines and compare DT12 to DT13: