Skip to main content
Question

How do you calculate the Last Day of the Fiscal Year?

  • September 27, 2013
  • 0 replies
  • 182 views

Our fiscal year is May 1st through April 30th each year. Based on the "Start Date" of a piece of work, I would like to calculate the last day of the Fiscal Year.

e.g. For Start Date 1-Feb-2013, End of Fiscal year would be 30-Apr-2013, and for Start Date 15-Nov-2013, End of Fiscal Year would be 30-Apr-2014.
This topic has been closed for replies.

Forum|alt.badge.img+6
  • Quickbase Alumni
  • September 27, 2013
Try this

var number YYYY = If(Month([Start Date])>=5,Year([Start Date])+1,Year([Start Date]));Date($YYYY,4,30)

  • Author
  • Quickbase Alumni
  • September 27, 2013
Works beautifully!  Thanks so much!

Forum|alt.badge.img+6
What's wrong with this formula? Trying too produce a year end date in the year my [Bound Date] is in is in. Also another formula needed for the end date of the following year that the [Bound Date] is in
var number YYYY = If(Year([Bound Date])=Year(Today), Year(Today)+1,Year(Today)+1);Date($YYYY,12,31) I am sure this is a more complicated formula than I need.

Based on what you say you are looking for, try this

var number YYYY = Year([Bound Date]);

Date($YYYY,12,31)

The formula for the next year would be

AdjustYear([my other date field], 1)

GeorgeBramhall2
Forum|alt.badge.img+11
Perfect, however, I forgot to mention that if [Expiration date] is not in current year, then end date is 12/31/YYYY, other wise it's [Expiration Date]. How do I add this criteria? And while I have you, I need another field that tells me how many months left in the current year from the Bound Date, if expiration date is not in the current year.

Try this

IF(Year([Expiration date])<> Year(Today()), Date(Year(Today()),12,31), [Expiration date]))

As for your second question, you will need to give some examples of the calculation as I'm not understanding the "ask".

GeorgeBramhall2
Forum|alt.badge.img+11
# of months between [Date End of this Year] - Today() or [Expiration Date if this year] - Today()

So end of Year is 12/21/2019 and Today() is 7/30/19 then # of months = 6 months.

GeorgeBramhall2
Forum|alt.badge.img+11
first formula above works perfectly, thank you.

I have not tested this lately, but I had it saved in my cheat notes.  Let me know if it tests OK. 


var date SD= Today();

var date ED=  IF(Year([Expiration date])<> Year(Today()), Date(Year(Today()),12,31), [Expiration date]));

(Year($ED)-Year($SD)-1)*12  // start off with 12 times the number of fully completed years

+If(Month($ED)>=Month($SD),12,0) //add 12 months if the last year was fully completed

 + If((Month($ED)>=Month($SD)),Month($ED)-Month($SD),12+Month($ED)-Month($SD)) // add the number of months between the month numbers.

 -If(Day($ED)<Day($SD),1,0) // but if the day did not catch up to the start date's day number, then subtract 1.

GeorgeBramhall2
Forum|alt.badge.img+11
Error with this formula where [Bound Date] = $SD:

var date ED=  IF(Year([Expiration Date 1])<> Year(Today()), Date(Year(Today()),12,31), [Expiration Date 1]));

(Year($ED)-Year([Bound Date])-1)*12  // start off with 12 times the number of fully completed years

+If(Month($ED)>=Month([Bound Date]),12,0) //add 12 months if the last year was fully completed

 + If((Month($ED)>=Month([Bound Date])),Month($ED)-Month([Bound Date]),12+Month($ED)-Month([Bound Date])) // add the number of months between the month numbers.

 -If(Day($ED)<Day([Bound Date]),1,0) // but if the day did not catch up to the start date's day number, then subtract 1.

GeorgeBramhall2
Forum|alt.badge.img+11
and why doesn't this formula work? What "types" of date fields does this formula not work for?

Month([Last Day of Year (Next Year)]-Month([First Day of Next Year (Bound Date)])

Sorry, I am not really understanding your question. You seem to be asking two different questions.