Focal Point
[SOLVED] QYY to Alpha

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

May 19, 2010, 11:34 AM
getit
[SOLVED] QYY to Alpha
Hi,
Need some tips on converting date in QYY to Alpha format.

Thanks.

This message has been edited. Last edited by: Kerry,


App Studio Version 8202
windows Platform
SQL Server 2008/2012
May 19, 2010, 12:23 PM
Francis Mariani
I imagine that the QYY date is really in integer or alpha format. Or it is a real date field that has been reformatted to QYY.

It is very easy to do but we require a bit more information.


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
May 19, 2010, 01:53 PM
jfr99
Here's one example:

-*
DEFINE FILE CAR
CNTR/I5 WITH CAR = CNTR + 1;
DTE/A8YYMD = DECODE CNTR (1 '20100115' 2 '20100415' 3 '20100715' 4 '20101115');
SD_QYY/QYY = DTE;
T1_QYY/A7 = 'Q' | EDIT(DATECVT(SD_QYY, 'QYY', 'Q'), '9 ') | EDIT(DATECVT(SD_QYY, 'QYY', 'YY'));
END
-*
TABLE FILE CAR
PRINT
CNTR
DTE
SD_QYY
T1_QYY
WHERE RECORDLIMIT EQ 4
END

Jim


WebFocus 8.201M, Windows, App Studio
May 19, 2010, 02:38 PM
getit
Yes , it is a real date field.
It looks like Q2 2010


App Studio Version 8202
windows Platform
SQL Server 2008/2012
May 19, 2010, 02:42 PM
Francis Mariani
What does the meta-data look like? The Master file information about the field? The values may look like Q2 2010, but the "real" date field is not defined as QYY.

Jim has provided one way to convert the field.


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
May 19, 2010, 02:43 PM
getit
Got it with jfr99's suggestion. Thanks a lot!


App Studio Version 8202
windows Platform
SQL Server 2008/2012