Jump to content

Greater than date in a IF statement trouble


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

Recommended Posts

  • Newbies

Hi. I am trying to create an IF statement to determine if the Date Booked for an event is greater than 1/31/2012 AND if the record is tagged a certain company.

Right now I have...

If [services::Date Booked > 1/31/2012 and Event::INC_LLC = "LLC"]

Problem is, if it is an LLC event, it always validates true regardless of what the date is. What am I missing? Thanks, Rich

Link to comment
Share on other sites

If [services::Date Booked > 1/31/2012 ...

it always validates true regardless of what the date is. What am I missing?

Hi Rich,

To explain why the evaluation is breaking, FM sees 1/31/2012 as '1 divided by 31 divided by 2012'. The result is: .0000160328352466. So any Date Booked would evaluate as greater (except if empty). When working with dates, using date functions protects from this.

And welcome to FM Forums!! :laugh2: This is absolutely the best forum for FileMaker.

Link to comment
Share on other sites

Indeed, if I ran that calculation it'd fail (or produce very unexpected results) because that date is the 1 day of the 31st month in 2012.

Link to comment
Share on other sites

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