1 Reply Latest reply on Jan 12, 2010 11:57 AM by philmodjunk

    Incorrect Date Comparison - 12/7/2009 >= 1/15/2010 evaluates to true

    apitire

      Summary

      Incorrect Date Comparison - 12/7/2009 >= 1/15/2010 evaluates to true

      Description of the issue

      Issue: FileMaker is incorrectly comparing dates. 12/7/2009 >= 1/15/2010 is evaluating to 1 (true) Screenshot avilable. Steps to Reproduce: Open Data ViewerEnter 12/7/2009 >= 1/15/2010 as the calulationClick Evaluate Now Result:1 Expected Result:0 Workaround:  12/7/2009 >= Date ( 1; 15; 2010) correctly evaluates to false Environment:FileMaker 10v3Windows 

        • 1. Re: Incorrect Date Comparison - 12/7/2009 >= 1/15/2010 evaluates to true
          philmodjunk
            

          The expression, 12/7/2009, evaluates as 12 divided by 7 divided by 2009 as the / operator is Filemaker's division operator.

           

          Thus you are comparing

           

          0.00085330299367133613027092370049065 to 0.00003316749585406301824212271973466

           

          in your first example which will evaluate to true.

           

          Dates are really whole numbers counting the number of days elapsed since an early arbitrary date.

           

          Thus, you should use the date function on both sides of the comparison operators in your expression.