Focal Point
[SOLVED] How to get the current US Gov Fiscal Year

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

May 24, 2010, 02:03 PM
WebGuy0212
[SOLVED] How to get the current US Gov Fiscal Year
I'm new to WebFocus. I was wondering if anyone out there had any code to get the current US governement fiscal year.

This is how it's done in classic asp but I need the equivalent in web focus...

Dim fy

//if the month is less than october then just get the current year
If Month(someDate) < 10 then
fy = Year(someDate)
Else
//add 1 to the current year
fy = Year(someDate) + 1
End If

This message has been edited. Last edited by: Kerry,
May 24, 2010, 02:14 PM
GinnyJakes
Assuming you want it in an amper variable:
-SET &CURRYR=EDIT(&YYMD,'9999');
-SET &CURRMO=EDIT(&YYMD,'$$$$99');
-SET &FISCALYR=IF &CURRMO LT 10 THEN &CURRYR ELSE &CURRYR + 1;



Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
May 24, 2010, 02:25 PM
WebGuy0212
Thanks Ginny.
May 25, 2010, 09:01 AM
jgelona
If you always want the Fed Fiscal Yr based on the system date, try this:
-SET &FFY=IF &DATEM LT 10 THEN &DATEYY ELSE &DATEYY+1;



In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.