Focal Point
[SOLVED]Translated date to HOLD file

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

October 10, 2012, 08:33 AM
ruhan
[SOLVED]Translated date to HOLD file
Does anyone know how to write translated dates to a hold file? For example if field THEDATE/YYMD contains 2012/10/31 I would like to write 31 October, 2012 to a HOLD file using format DMtrYY (instead of the internal number)

Thanks, Ruhan

This message has been edited. Last edited by: ruhan,
October 10, 2012, 10:02 AM
Francis Mariani
Look at the CHGDAT and the DATETRAN functions:

TABLE FILE CAR
SUM 
SALES
COMPUTE THEDATE/YYMD = '2012/10/31';
COMPUTE THEDATEA/A8YYMD = THEDATE; 
COMPUTE THEDATEX/A17 = CHGDAT ('YYMD', 'DMXYY', THEDATEA, 'A17');

COMPUTE THEDATEB/A30 = DATETRAN (THEDATE, '(DMYY)', '(wrctrdo)', 'EN', 30, 'A30');

COMPUTE THEDATEC/A30 = DATETRAN (THEDATE, '(DMYY)', '(trcdo)', 'EN', 30, 'A30');


BY COUNTRY
END


CHGDAT will not give you mixed case and DATETRAN is confusing but any date format can be squeezed out.

This message has been edited. Last edited by: Francis Mariani,


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
October 10, 2012, 04:41 PM
Waz
The one piece of info missing is the background.

To hold a formatted date, it must be converted to an alpha string.

Why do you need the date held this way ?


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!

October 16, 2012, 01:26 AM
ruhan
Thanks, Francis. I was just wondering whether one could get by without using a subroutine.

Ruhan