Help

Re: Formula for assigning value to date ranges

Solved
Jump to Solution
775 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Dani_Oliver
6 - Interface Innovator
6 - Interface Innovator

Hey there. I’m trying to create a field that populates the fiscal year that a project is published in, as it’s different from the actual year.

So if the date of the project is between December 1, 2003 and November 30, 2004, it’s FY04. And so on for the following years ad infinitum. Any help would be appreciated; I’m having trouble with date formulas and I trawled through posts but couldn’t find a solution that worked for me.

Thanks in advance.

1 Solution

Accepted Solutions

Ok, if I’m getting this right, then if a date is between Dec 1 and Jan 1, we’ll return the following calendar year, otherwise we’ll return the current calendar year.

IF(
    AND(
        IS_AFTER(
            {Published Date},
            DATESTR("" & YEAR({Published Date}) & "-11-30" )
        ),
        IS_BEFORE(
            {Published Date},
            DATESTR("" & YEAR({Published Date}) + 1 & "-01-01" )
        )
    ),
    "FY" & RIGHT(""&(YEAR({Published Date}) + 1),2),
    "FY" & RIGHT(""&YEAR({Published Date}),2)
)

Screen Shot 2020-08-27 at 5.20.59 PM

See Solution in Thread

5 Replies 5
Zollie
10 - Mercury
10 - Mercury

The first day of the fiscal year can change over time, no? So this formula would need to be maintained or altered over time? And can projects also span through multiple fiscal years? So you’d sometimes end up with FY04, FY05?

No, the fiscal year stays the same. Always Dec 1 through Nov 30. And this isn’t for project span, but publication date / end of project, so if something is published on December 2, 2003 it would always be FY04.

Ok, if I’m getting this right, then if a date is between Dec 1 and Jan 1, we’ll return the following calendar year, otherwise we’ll return the current calendar year.

IF(
    AND(
        IS_AFTER(
            {Published Date},
            DATESTR("" & YEAR({Published Date}) & "-11-30" )
        ),
        IS_BEFORE(
            {Published Date},
            DATESTR("" & YEAR({Published Date}) + 1 & "-01-01" )
        )
    ),
    "FY" & RIGHT(""&(YEAR({Published Date}) + 1),2),
    "FY" & RIGHT(""&YEAR({Published Date}),2)
)

Screen Shot 2020-08-27 at 5.20.59 PM

Ahh, yes, this is such a smart way to do it and I feel stupid, thank you.

One thing: the first row, 12/1/2019 should be FY20 because Dec 1 is the first day the next FY. But the rest of the rows are correct. So should I change the top date to “-11-30”?

Definitely not stupid. This is a tricky one with all the formatting and type conversions.

should I change the top date to “-11-30”?

Yeah I believe so. It’s yours now. Feel free to mess around with it.