Focal Point
[CLOSED] Fiscal month date calculation

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

March 14, 2013, 07:29 AM
a03654
[CLOSED] Fiscal month date calculation
Hi all,

can someone plz let me know how to calculate first day & end day of the previous fiscal month

Note: January last week's saturday is considered as Fiscal year end

This message has been edited. Last edited by: <Kathryn Henning>,
March 14, 2013, 08:56 AM
Doug
Hello a03654, A great place to start is, from within Dev Studio: Press F1 and enter "DATE" in the index, follow down to "date and time functions, DATEMOV". You'll find a lot of date functions. But, be sure that the gregorian BOM is the same as you Fiscal BOM...
March 15, 2013, 07:10 AM
a03654
Hi Doug,

Thanks for the reply.

i have got the table name as T_DB2U_ACCT_DATE and Accounting month, accounting date fields as MO_I, ACCT_D.
Can someone please provide a logic to calcluate previous fiscal month's start, end dates.
March 18, 2013, 09:37 AM
Kevin W
Since I can't see your date formats, I cant't reply with exact code. I would do the following using the DATEADD function. Despite the name it does subtractions by using a negative number.

Since you have the current accounting month, set up a date field for the first of that month. Then create two previous month date fields. Into one of them subtract one month from your new first of the month field to give you the first of the previous accounting month and into the other subtract one day to give you the last day of the previous month.


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.