Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default calculating hours

I have a macro that is putting the (1) start date, (2) start time, (3), end
date, and (4) end time in 4 separate fields. What I need to do is calculate
the number of hours between (1) the start date and time AND (2) the end date
and time.

I've tried combining the date and time for both the start and end but I'm
not having much luck getting good values. Once I get these combined, I was
going to subtract the values and then use the "quotient" function to get the
number of days and then the "mod" function to get the remainder (which I use
to determine if another day is added to the total.

Any suggestions on how to best accomplish this or other methods to get the
number of hours (in days) and the remainder is greatly appreciated. Thanks
for the help.........
--
JT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default calculating hours

((end_date+end_time)-(start_date+start_time))*24

Tim

--
Tim Williams
Palo Alto, CA


"JT" wrote in message
...
I have a macro that is putting the (1) start date, (2) start time, (3),

end
date, and (4) end time in 4 separate fields. What I need to do is

calculate
the number of hours between (1) the start date and time AND (2) the end

date
and time.

I've tried combining the date and time for both the start and end but I'm
not having much luck getting good values. Once I get these combined, I

was
going to subtract the values and then use the "quotient" function to get

the
number of days and then the "mod" function to get the remainder (which I

use
to determine if another day is added to the total.

Any suggestions on how to best accomplish this or other methods to get the
number of hours (in days) and the remainder is greatly appreciated.

Thanks
for the help.........
--
JT



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
Calculating hours Thomas Excel Worksheet Functions 1 March 5th 09 01:52 PM
Calculating pay hours DeeDee Excel Discussion (Misc queries) 1 March 1st 09 12:02 AM
Calculating hours Marty Excel Worksheet Functions 5 September 24th 08 10:56 AM
Calculating hours Pagina-eind hyperlink probleem Excel Discussion (Misc queries) 3 October 18th 07 01:57 PM
Calculating hours Ian[_3_] Excel Worksheet Functions 8 September 19th 07 11:51 AM


All times are GMT +1. The time now is 02:37 AM.

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"