Excell macro to calculate date differences [Closed]

Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,
I have a date string in following format: October 1, 2010 8:00:00 AM GMT+03:00
I need to calculate time difference in days between 2 dates in this format.Can you please help?
Any help would be greatly appreciated
Anna

2 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
You said in this format . So what answer you expect in this case

October 1, 2010 8:00:00 AM GMT+03:00
October 1, 2010 9:00:00 AM GMT+03:00
0 days for everything that less then 1 day will be good , thanks
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Depending on how u want to use it, one option would
to covert to date
=DATEVALUE(LEFT(A1, FIND(" GMT",A1))) + TIMEVALUE(LEFT(A1, FIND(" GMT",A1))) - DATEVALUE(LEFT(A2, FIND(" GMT",A1))) + TIMEVALUE(LEFT(A2, FIND(" GMT",A2)))

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!