Hello All,
I'm trying to get differene between two date & time and unable to get the results in hours.
Please help me to resolve my problem.
Thank you!!
Start 09-24-2018 11:49:53 PM IST End 09-25-2018 1:49:53 PM IST Difference ?????Hello All,
I'm trying to get differene between two date & time and unable to get the results in hours.
Please help me to resolve my problem.
Thank you!!
Start 09-24-2018 11:49:53 PM IST End 09-25-2018 1:49:53 PM IST Difference ?????Your data doesn't contain dates. Therefore the text you have must be converted to dates before it can be used in calculations. This task is made more difficult by 4 factors.
SUBSTITUTE($B3,UNICHAR(8206),"")
VALUE(MID($B3,7,4)),VALUE(LEFT($B3,2))
So, the formula in B3 is below. Copy it down to B4.
=DATE(VALUE(MID($B3,7,4)),VALUE(LEFT($B3,2)),VALUE(MID($B3,4,2)))+TIMEVALUE(MID(SUBSTITUTE($B3,UNICHAR(8206),""),FIND(" ",SUBSTITUTE($B3,UNICHAR(8206),""))+1,FIND(" ",SUBSTITUTE($B3,UNICHAR(8206),""),FIND(" ",SUBSTITUTE($B3,UNICHAR(8206),""))+1)-FIND(" ",SUBSTITUTE($B3,UNICHAR(8206),""))+2))
Once you start dissecting it you will find that extracts the date string and converts it to a date, which is a number in Excel. To that number the TimeValue of the time string is added.
To calculate the difference, simply =B4-B3 and format the result as Time.