Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

If statement for date giving wrong answer

Hi,

 

In the screenshot below I have a date field (first column) created using the CALENDARAUTO() function. The last field PricingTrialBeforeDuringOrAfter should flag each record as being "Before" or "During" the pricing trial period which started on the 5th June 2017. The if formula is shown in the formula bar in the screenshot below. My problem is that the formula is incorrectly flagging records from 31 December 1899 as "During", whereas it should be lableing records from 5th June 2017 as "During". Please could you tell me how to fix it?

 

 

Thanks,

 

CM

  • Hi Anonymous,

     

    Please add date to the date as below

     

    PricingTrialBeforeDuringorAfter=IF([Dare].[Date]>date(2007,06,05),"During","Before")

     

    Ninter

2 Replies

  • Hi Anonymous,

     

    Please add date to the date as below

     

    PricingTrialBeforeDuringorAfter=IF([Dare].[Date]>date(2007,06,05),"During","Before")

     

    Ninter

  • Hi,

     

    Try this

     

    =IF([Date]>DATE(2017,6,5),"During",Before")

     

    Hope this helps.