LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Calculating time between two dates

Hi,
Thank you so much for the effort you have put in.
But my badluck, this is not working :(
I am using MS Office 2003. Will there be any differance depends on the
version?

I entered in A1- 19/01/2007 16:00:00
in B1- 22/01/2007 11:00:00
and
in C1- =(NETWORKDAYS(A1,B1,holidays)-1)*("18:00"-"09:00")+MOD(B1,1)-MOD(A1,1)

I get result in C1 as #VALUE!
I have added Analysis ToolPak as mentioned.

Thanks,
Sujith

"daddylonglegs" wrote:

=B1-A1 should work OK irrespective of the date format but if you want to
calculate business hours only, assuming A1 and B1 are both within business
hours (by your definition) then try

=(NETWORKDAYS(A1,B1,holidays)-1)*("18:00"-"09:00")+MOD(B1,1)-MOD(A1,1)

format as [h]:mm

note: NETWORKDAYS is part of Analysis ToolPak add-in, if you don't have this
installed use TOOLS Addins and tick "Analysis ToolPak" checkbox

holidays should be a named range including a list of your holiday dates

"Sujith" wrote:

Hi,

I am making a report in which I want the time differance between two dates.
Eg: In A1 the value is 19/01/2007 16:00:00
In B1 the value is 22/01/2007 11:00:00

A1 is responded time for an issue and B1 is resolved time.
I want the result in C1 as the time differance i.e. B1-A1. When I refered
the posts here, the formula =B1-A1 works only with MMDDYY format and does not
work with my time format which is DDMMYY.

I also want a formula to make excemption of holidays and off hours, say 20th
and 21st Jan are holidays and working hours are from 9:00 to 18:00.

Thanks,
Sujith

 
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 time between two dates Gary''s Student Excel Discussion (Misc queries) 0 January 19th 07 08:13 PM
calculating time E-QUIP Excel Worksheet Functions 3 December 27th 06 09:44 PM
Calculating Business Hours Between 2 Dates tanya216 Excel Discussion (Misc queries) 3 April 11th 06 03:22 PM
Calculating Time Past Midnight Darren Excel Worksheet Functions 6 March 13th 06 03:03 PM
How to create command button to save the dates and time Ken Vo Excel Discussion (Misc queries) 6 January 5th 06 04:18 AM


All times are GMT +1. The time now is 02:50 PM.

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

About Us

"It's about Microsoft Excel"