AnsweredAssumed Answered

Using Get(CurrentDate) to determine Current or Last financial year quarters

Question asked by simonpsmith on Jan 19, 2017
Latest reply on Jan 19, 2017 by simonpsmith

I have a strange thing going on that I'd rather confirm is right rather than 'just use it as it seems to be working'.


In my solution I have a reports page where you can either enter the reporting period start and end dates manually, or click on one of eight buttons that will fill in these global start/end dates for the most commonly required reporting periods (quarters of the financial year April to March for the current or previous year).


So as of today 19/1/17 (UK date system - although I know FM 'works' in US order so that’s not my issue) the buttons should fill in:

Current Year

1st Qtr = 1/4/16 to 30/6/16

2nd Qtr = 1/7/16 to 30/9/16

3rd Qtr = 1/10/16 to 31/12/16

4th Qtr = 1/1/17 to 31/3/17

Last Year

1st Qtr = 1/4/15 to 30/6/15

2nd Qtr = 1/7/15 to 30/9/15

3rd Qtr = 1/10/15 to 31/12/15

4th Qtr = 1/1/16 to 31/3/16


To make this work I have a script for each button which (I thought) were working to determine which month of the year we are currently in, and so would change the 'year' part of the date to be entered accordingly.


So at 31/12/16 the current year 1st Qtr ‘year’ should be represented by Year(Get(CurrentDate)), whereas at 19/1/17 the ‘year’ should be represented by Year(Get(CurrentDate))-1


My issue is that to make it work correctly, by looking at the current month, it seems I have to use the greater or less/equal symbols in the wrong direction in the formulae, unless I’m missing something really really basic.


IF [Get(CurrentDate)  ≤ Month (3)] for January 17 to March 17, should make the start date ‘current year minus one’, but I’m having to enter it as ‘IF[Get(CurrentDate)  ≥ Month (3)]’.


Surely the first statement is looking for if the current month date is smaller or equal than the 3rd month, and so would set the year as current minus one…


Attached is what should work, and what is working…


Your help, please!



although I know FM 'works' in US order so that’s not my issue