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 7198 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I want to create a field that will return a "1" if the date in another field is after 1/1/2005 and return a "0" if the date is prior to 1/1/2005.

The argument in the logical functions do not seem to be able to treat a date like a number. If I enter (If "date field">1/1/2005, 1,0) for the calculation for the field I want to create, FileMaker does not seem to under stand the > or the < as greater than or less than in relation to dates. What is the "language" you need to use in a formula that indicates "before or after" a given date?

Steve

Posted

In fact, in honor of JT (-Queue-) you can drop the Case() entirely. Make the calculation number:

datefield > Date(1;1;2005)

This uses Boolean logic and produces a 1 or 0 automatically. On a calculation such as this it doesn't matter (and that's why Lee didn't bother with it) but for more complex calculations the savings can add up and it also is a bit cleaner to write.

Sometimes a simpler example shows a principle more clearly. The Boolean logic in more complex formulas then stands out for you and that's my only reason for mentioning it. It's a good understanding to have in your arsenal.

JT was the king of Boolean logic and I miss his fine-tuning. smile.gif

LaRetta

This topic is 7198 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.