Help with a formula

Copper Contributor

I need help with a formula please.  I am trying to write a formula that is for Date in culmn H and the Date in column I equals how many days for the answer to go in column J. 

For example: 

Date of column H is 08/15/2022 and the Date of column I is 09/22/2022 = the answer for column J should be 38 days. 

 

I was given this formula =Datedif(H2,I2,"D") but that is not working to give me days. 

3 Replies
In Excel, dates are stored as numbers, where the portion to the left of the decimal is number of days since 12/31/1899, and the decimal portion is the fraction of a day.
To get the number of days between two dates, just subtract them.
Your formula should be =I2-H2 and the answer will be 38.

If your date cells include times, and you want to know the number of days between them, regardless of the time, you can round the dates down (eliminating the time) and then subtract.
=ROUNDDOWN(I1,0)-ROUNDDOWN(H1,0)

@Karla Keeney 

 

Thank Karla. I appreciate the help. 

@JODIC73 

You're welcome! Glad to help.