Excell macro to calculate date differences

Closed
LenaR - Sep 23, 2011 at 03:36 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Sep 23, 2011 at 05:20 AM
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 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Sep 23, 2011 at 03:43 AM
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
0 days for everything that less then 1 day will be good , thanks
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Sep 23, 2011 at 05:20 AM
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)))
0