1

I am trying to calculate the amount of days between two dates but my formula doesn't seem to be working properly. It's as is the function is ignoring the years in the dates. My function is as follows, formated as a Number:

=IF([Today's date]>[Expiration Date],-DATEDIF([Expiration Date],[Today's date],"d"),(DATEDIF([Today's date],[Expiration Date],"d")))

I receive this error if I use the above function(Owners removed):

enter image description here

But then I replace -DATEDIF([Expiration Date],[Today's date],"d") with -DATEDIF([Today's date],[Expiration Date]"d") i get this result:

enter image description here

This is telling me that both cases are being treated as IF([Today's date]>[Expiration Date] even though 3/24/2015 is clearly larger than 11/03/2014. Can somebody please tell me what I'm doing wrong? Thanks.

1

Try

=[ExpirationDate] - [TodaysDate]
  • Ugh i feel stupid!! I was under the impression that the first item was expired. Thanks for the help. Gotta stop over thinking things. – PT_C Nov 3 '14 at 16:07
  • @PT_C Cheers!!! – Amal Hashim Nov 3 '14 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.