#1
|
|||
|
|||
subtract date and time and convert to decimal hours ?
Hi, column A is time format, column B is date format, column C is duration in decimal hours of that pair from the row above. A B C 1 12:45:00 14-Jan-2017 2 00:30:00 16-Jan-2017 35.75 what formula to use in C to get the duration as decimal hours please ? I see in another thread =MOD(A63-A62,1)*24 to crossover a day but poster hadnt a date column , I have more than 1 day gaps ! DBenz |
#2
|
|||
|
|||
=(A2-A1)*24 works for me.
|
#3
|
|||
|
|||
Quote:
= ((B2+A2)-(B1+A1))*24 |
#4
|
|||
|
|||
@NoSparks
You are right. I misread it to have both time and date in one cell. |
#5
|
|||
|
|||
Hi,
created the cells with time format A and date format B and general C and got #value! so made C number format 2 dec places still get #value! ah solved it, I had done a test lower down and of course the row numbers are not 1 and 1, silly me ! DBenz |
#6
|
|||
|
|||
That tells me the time/date may not actually be numbers.
You can verify this by using ISNUMBER Try... =ISNUMBER(A1) Do you get false or true? Try this also with what's in B1. If you get false, you may have a time/date which looks like a number, but in reality is text. You need to convert to text or check to see if you have any extra spaces. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert [h]:mm:ss to Decimal Hours to Count FTE for Month | Ethan2015 | Excel | 2 | 09-18-2015 03:55 AM |
Formula for decimal hours from two date time entries | DBenz | Excel Programming | 0 | 01-15-2015 05:52 AM |
Converting decimal to hours | jhwtsang | Excel | 4 | 05-16-2011 01:36 PM |
Date and time calcs excluding non-working hours | mrsatchmo | Excel | 1 | 01-26-2011 08:50 AM |
Convert hours in decimal | ghostones | Excel | 1 | 12-29-2009 09:17 PM |