Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7434 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

We are trying to create a field to calculate fiscal year of an existing date field.

This is what we came up with:

Case( Year(Date of Intake = "2004" and Month( Date of Intake >= "07" and Month(Date of Intake <= "12"))), "2005" , Year(Date of Intake = "2005" and Month( Date of Intake >= "01" and Month(Date of Intake <= "06"))), "2005" ,Year(Date of Intake = "2005" and Month( Date of Intake >= "07" and Month(Date of Intake <= "12"))), "2006" , Year(Date of Intake = "2006" and Month( Date of Intake >= "01" and Month(Date of Intake <= "06"))), "2006" )

Can anyone tell us what is wrong?

Thanks!

Posted

Year and Month functions return numbers, so quotes aren't necessary and probably won't work with the single digit months with a leading zero either. You're also missing closing parentheses around Year and Month in all of your tests. They should look like Year(Date of Intake) or Month(Date of Intake).

That aside, you can use a simple Year(Date of Intake) + (Month(Date of Intake) > 6), and not have to hardcode anything. Enclosing the Month(Date of Intake) > 6 test in parentheses forces it to act like a boolean, returning 1 when true and zero when false, effectively adding 1 year if the month is greater than 6.

This topic is 7434 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.