Excell macro to calculate date differences

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

Related:

2 responses

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
23 Sep 2011 à 03:43
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
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
23 Sep 2011 à 05:20
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)))