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

I would like to be able to substract entry of two military times and come up with the difference in Hours and tenths of an hour. Example 0945-0800 = 145 converted to 1.75 hours.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Substacting two military times

Hi Jake!

If you have your calculations in the form shown:

=(TIME(LEFT(A13,2),MID(A13,3,2),0)-TIME(MID(A13,6,2),RIGHT(A13,2),0))*
24

The Time functions use the syntax TIME(Hour, Minute, Second)
The text parsing functions LEFT, MID and RIGHT are extracting the
arguments for the TIME function
The result has to be multiplied by 24 since Excel treats time as a
decimal part of 1 day.

If you have your times in different cells you should be able to adapt
the above.

For Excel's handling of time generally see:

http://www.cpearson.com/excel/datetime.htm#TOC

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Jake Swarty" wrote in message
...
I would like to be able to substract entry of two military times and

come up with the difference in Hours and tenths of an hour. Example
0945-0800 = 145 converted to 1.75 hours.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Substacting two military times

On Mon, 15 Dec 2003 14:21:08 -0800, "Jake Swarty" wrote:

I would like to be able to substract entry of two military times and come up with the difference in Hours and tenths of an hour. Example 0945-0800 = 145 converted to 1.75 hours.


With 0800 in A1 and 0945 in A2:

=DOLLARDE(A2/100,60) - DOLLARDE(A1/100,60)

If the DOLLARDE function is not available, and returns the #NAME? error,
install and load the Analysis ToolPak add-in.




--ron
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
How do I set up a stacked bar chart using military times? Healthcare Quality Analyst Charts and Charting in Excel 2 September 22nd 09 09:14 PM
Working with times in military/international format. MidWest Yankee Excel Discussion (Misc queries) 2 April 8th 08 03:29 PM
How do I caculate 24 hour military times tom Excel Worksheet Functions 6 October 30th 06 11:03 AM
Calculation of hourly rate times hours times 1.5 Newbusinessbod Excel Worksheet Functions 1 December 6th 05 04:44 PM
How are relay leg times or driving times entered and totaled? commissioner Excel Worksheet Functions 1 July 26th 05 09:27 PM


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