[Solved] How the heck to I convert Quarters to a string?
I don't know why this is hard, but how do I concatenate a quarter value such as Q1 2010 into a string? Is it with EDIT? DATECVT? I can't find an output format that actually produces a simple representation of quarters.
This gives me the first day of the quarter -- DATECVT(ENCOUNTER_DATE_START, 'MDYY', 'A8MDYY') and I need that too. Is there a format I can put in that will just give me the text representation of a quarter date?
J.This message has been edited. Last edited by: John_Edwards,
September 20, 2010, 04:50 PM
Prarie
Is this what you are looking for?
DEFINE FILE CAR TODAY/MDYY = &MDYY; QUARTER/QYY = TODAY; END TABLE FILE CAR PRINT CAR TODAY QUARTER ENDThis message has been edited. Last edited by: Prarie,
September 20, 2010, 04:58 PM
jfr99
This is one way to make a string:
DEFINE FILE CAR SD_MDYY/MDYY = &MDYY; QTR/A7 = EDIT(DATECVT(SD_MDYY, 'MDYY', 'Q'),'Q9 ') | EDIT(DATECVT(SD_MDYY, 'MDYY', 'YY')); END -* TABLE FILE CAR PRINT CAR SD_MDYY QTR END
WebFocus 8.201M, Windows, App Studio
September 20, 2010, 05:13 PM
Francis Mariani
Very nice, jfr99.
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