![]() |
Extracting time (hr:min) from date/time format
I have data that is in date/time format in columns C and D that I want to
extract the time only so I can subtract and find out the actual hrs/minutes. Example of data: Column C Column D 8/1/2008 3:30 8/1/2008 13:55 8/2/2008 1:30 8/5/2008 4:30 Thanks! |
Extracting time (hr:min) from date/time format
Check out this reference...
http://www.cpearson.com/excel/datetime.htm#AddingTimes -- HTH... Jim Thomlinson "lawandgrace" wrote: I have data that is in date/time format in columns C and D that I want to extract the time only so I can subtract and find out the actual hrs/minutes. Example of data: Column C Column D 8/1/2008 3:30 8/1/2008 13:55 8/2/2008 1:30 8/5/2008 4:30 Thanks! |
Extracting time (hr:min) from date/time format
If you have a time/date in C2 you can get the time only by using this formula =MOD(C2,1) .....but what result do you expect from your data? The 2nd line has 2 different dates, don't you want to take the dates into account when calculating the difference? -- barry houdini ------------------------------------------------------------------------ barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=126433 |
Extracting time (hr:min) from date/time format
My apologies. Yes, I do want to take the dates into account as well. What I'm
trying to do is get the actual number of minutes (subtracting column D from column C) so I can figure an average time (I have over 300 rows of such data). If I simply subtract column D from column C, where say 35 minutes have transpired yet the dates are the same day, I get a result of 0. Sorry for the inadequate description. "barry houdini" wrote: If you have a time/date in C2 you can get the time only by using this formula =MOD(C2,1) .....but what result do you expect from your data? The 2nd line has 2 different dates, don't you want to take the dates into account when calculating the difference? -- barry houdini ------------------------------------------------------------------------ barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=126433 |
Extracting time (hr:min) from date/time format
To get the number of minutes try like this =(D2-C2)*1440 format result cell as number -- barry houdini ------------------------------------------------------------------------ barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=126433 |
All times are GMT +1. The time now is 05:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com