Tuesday, 10 June 2008

Calculate difference between two dates

Today I had a cute requirement which is pretty small. The user want to see the time difference between two different time stamps.
Steps to do this
1) Create a column Date1 of DateTime
2) Create a column Date2 of DateTime
3) Create another column of Datatype Calculated type.
then enter the following formula in that column settings
=TEXT([DATE2]-[DATE1],"H:MM").

then you are done

4 comments:

Anonymous said...

It is not working if year is different.

Govt Cheese said...

How about if you want the answer to show up in terms of Days and Hours?

Anonymous said...

Thanks Much...It worked for me

Anonymous said...

thank you
I have updated some letters but it is work fine
thank you very much.
Do you know how calculate business days between two days
if yes please send me an email on m_hawasly@hotmail.com
thank you twice