Focal Point
[SOLVED]Convert 140119 TO 2014/01/19

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

February 19, 2014, 11:57 AM
Jay Potter
[SOLVED]Convert 140119 TO 2014/01/19
I am trying to convert the value convert 140119 TO 2014/01/19, but I keep getting 1914/01/19. I am doing this in a synonym. How do I get the century to change? the formats I am using I6YMD to I8YYMD.

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
February 19, 2014, 12:09 PM
Francis Mariani
How are you currently doing it in the synonym?


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
February 19, 2014, 12:15 PM
Francis Mariani
Add SET DEFCENT = 20 to edasprof.prf if you're working with dates that do not contain the century.
SET DEFCENT = 20

TABLE FILE CAR
PRINT
COMPUTE DT1/YMD = '140119';

COMPUTE DT1_YYMD/YYMD = DT1;

BY COUNTRY NOPRINT
WHERE READLIMIT EQ 1;
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
February 19, 2014, 12:17 PM
Jay Potter
Here is my synonym code.

DEFINE IB_A099PTDT_I6YMD/I6YMD=A099PTDT; $
DEFINE IB_A099PTDT_YYMD/YYMD=IB_A099PTDT_I6YMD; $


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
February 19, 2014, 12:18 PM
Francis Mariani
Look up DEFCENT and YRTHRESH in the Developing Reporting Applications manual, Customizing Your Environment section.


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
February 19, 2014, 02:03 PM
Jay Potter
I updated edaprof and it worked.

Thanks


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
February 19, 2014, 03:32 PM
Waz
As Francis says, check the documentation on DEFCENT and YRTHRESH, so you understand how the windowing for two digit year dates works.


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!