You are viewing limited content. For full access, please sign in.

Question

Question

difference between two dates

asked on August 18

Hello, I am trying to calculate the difference between 2 dates and have tried the following formulas I found in the community, but i still get an error. Any help is much appreciated. Thanks you! (Using LF 11)

formula 1: =DATEDIF(Blood_Donation_Details.Donation_Date,Blood_Donation_Details.Use_Date, "m")

formula 2: =IF(AND(Blood_Donation_Details.Donation_Date<>"", Blood_Donation_Details.Use_Date<>""), DATEDIF(Blood_Donation_Details.Donation_Date, Blood_Donation_Details.Use_Date, "M"), 0)

formula 3: =IF(AND(INDEX(Blood_Donation_Details.Donation_Date,ROW())<>"",
INDEX(Blood_Donation_Details.Use_Date,ROW())<>""),DATEDIF(INDEX(Blood_Donation_Details.Donation_Date,ROW()),INDEX(Blood_Donation_Details.Use_Date,ROW()),"d"),0)

 

0 0

Answer

SELECTED ANSWER
replied on August 18

SUB(INDEX(Blood_Donation_Details.Use_Date,ROW()),INDEX(Blood_Donation_Details.Donation_Date,ROW())) 

 

 

2 0

Replies

replied on August 18

You can use Simple Substraction of 2 dates to get the difference in days as well

=SUB(EndDate,StartDate)

3 0
replied on August 19

Thank you Steve and David!

Both worked, but choosing David's as it is within a table. smiley

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.