Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting date from Date and Time formatted cell Aviral Sharma Excel Discussion (Misc queries) 2 March 6th 09 05:04 AM
Need help extracting date and time with Excel 2K tech1NJ Excel Worksheet Functions 11 November 10th 08 05:39 PM
Extracting specific data from Date and time strings John Norfolk Excel Discussion (Misc queries) 3 September 24th 08 09:52 AM
Extracting Time from a cell that has both the date and the time Hani Muhtadi Excel Discussion (Misc queries) 3 September 9th 05 10:59 AM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"