Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default minutes between two times

Can anyone exmaplin how to find the number of minutes between two times.
These times are in the format hh:mm:ss. whenever I try to format(nTime,"mm")
it allways gives me the hour not the minute.
Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default minutes between two times

Steve -

Subtract the smaller time from the larger, and multiply the difference
by 1440 (60 min/hours x 24 hours/day). Excel stores times as fractions
of a day: 24 hours = 1.0.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Steve wrote:

Can anyone exmaplin how to find the number of minutes between two times.
These times are in the format hh:mm:ss. whenever I try to format(nTime,"mm")
it allways gives me the hour not the minute.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default minutes between two times

Just be careful when the date window covers midnight. The smaller time might
not be earlier.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Jon Peltier" wrote in message
...
Steve -

Subtract the smaller time from the larger, and multiply the difference
by 1440 (60 min/hours x 24 hours/day). Excel stores times as fractions
of a day: 24 hours = 1.0.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Steve wrote:

Can anyone exmaplin how to find the number of minutes between two times.
These times are in the format hh:mm:ss. whenever I try to

format(nTime,"mm")
it allways gives me the hour not the minute.
Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default minutes between two times

Rob -

Good point. That's why I always save the time with the date. In some
work I did with a previous employer, there was only a time column
without any date (the previous programmer was a dolt). I would insert a
column and stick in a formula that incremented the time by 1 if it was
less than the first time in the column. Since most processes ran shorter
than 24 hours, this was okay.

I just finished another job in which the client didn't understand
Excel's dates and times. He'd programmed his equipment to break up the
time into three columns: Date, Time, and milliseconds. I showed him how
to use custom number formats, especially "yyyy/mm/dd hh:mm:ss.000".

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Rob van Gelder wrote:

Just be careful when the date window covers midnight. The smaller time might
not be earlier.


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
Adding minutes to Times ricky Excel Worksheet Functions 4 August 7th 06 04:39 PM
how do I calculate minutes when given two times? Kina Excel Worksheet Functions 2 June 17th 06 04:38 AM
Excel, how do you add times with minutes more than 60 squeeky New Users to Excel 2 June 8th 06 03:35 AM
how do i calculate minutes between two times? Ron Excel Discussion (Misc queries) 5 February 2nd 05 01:39 AM
Calculating the minutes between two times David Kuhn Excel Programming 3 February 23rd 04 07:02 PM


All times are GMT +1. The time now is 06:52 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"