Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Raj Raj is offline
external usenet poster
 
Posts: 130
Default Difference between 2 time stamps

Hi All

I require a formula to compute the difference between 2 date stamps. Here is
my requirement. We have time the issue is raised in K2 and target time to
complete is in O2
for example
K2 : 5/29/2009 4:15:21 PM
O2: 6/1/2009 4:15:21 PM

The difference between this 2 must be 8 hours as we work from Monday to
friday
timings 9.00 to 17.00 daily.

Can anyone help me regarding this.

Raj
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Difference between 2 time stamps

If O2 and K2 are in date/time formats..

=O2-K2

Use the above formula and format the cell to the below format. Right
clickFormat CellsCustom FormatType:=

[h]:mm:ss

If this post helps click Yes
---------------
Jacob Skaria


"Raj" wrote:

Hi All

I require a formula to compute the difference between 2 date stamps. Here is
my requirement. We have time the issue is raised in K2 and target time to
complete is in O2
for example
K2 : 5/29/2009 4:15:21 PM
O2: 6/1/2009 4:15:21 PM

The difference between this 2 must be 8 hours as we work from Monday to
friday
timings 9.00 to 17.00 daily.

Can anyone help me regarding this.

Raj

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Difference between 2 time stamps

=O2-K2-IF(AND(WEEKNUM(O2,2)WEEKNUM(K2,2),WEEKDAY(O2,2)<W EEKDAY(K2,2)),
(WEEKNUM(O2,2)-WEEKNUM(K2,2))*(2+TIME(16,0,0))
+4*(WEEKNUM(O2,2)-WEEKNUM(K2,2)-1)*TIME(16,0,0),0)
Regards,
Stefi

€˛Raj€¯ ezt Ć*rta:

Hi All

I require a formula to compute the difference between 2 date stamps. Here is
my requirement. We have time the issue is raised in K2 and target time to
complete is in O2
for example
K2 : 5/29/2009 4:15:21 PM
O2: 6/1/2009 4:15:21 PM

The difference between this 2 must be 8 hours as we work from Monday to
friday
timings 9.00 to 17.00 daily.

Can anyone help me regarding this.

Raj

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Difference between 2 time stamps

For me that gives 72 hours, not the 8 hours that Raj requested.
It doesn't take account of the 8 hour working day, nor does it allow for
weekends.
--
David Biddulph

"Jacob Skaria" wrote in message
...
If O2 and K2 are in date/time formats..

=O2-K2

Use the above formula and format the cell to the below format. Right
clickFormat CellsCustom FormatType:=

[h]:mm:ss

If this post helps click Yes
---------------
Jacob Skaria


"Raj" wrote:

Hi All

I require a formula to compute the difference between 2 date stamps. Here
is
my requirement. We have time the issue is raised in K2 and target time to
complete is in O2
for example
K2 : 5/29/2009 4:15:21 PM
O2: 6/1/2009 4:15:21 PM

The difference between this 2 must be 8 hours as we work from Monday to
friday
timings 9.00 to 17.00 daily.

Can anyone help me regarding this.

Raj



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Difference between 2 time stamps

It might be worth trying
=(NETWORKDAYS(K2,O2)-1)*8+(MOD(O2,1)-MOD(K2,1))*24 if you want an answer in
decimal hours, or
=(NETWORKDAYS(K2,O2)-1)/3+MOD(O2,1)-MOD(K2,1) if you want an answer in
Excel time [h]:mm:ss

If you have start or end times which fall outside your defined working week
you'll have to define how to treat them, and modify the formula accordingly.
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
For me that gives 72 hours, not the 8 hours that Raj requested.
It doesn't take account of the 8 hour working day, nor does it allow for
weekends.
--
David Biddulph

"Jacob Skaria" wrote in message
...
If O2 and K2 are in date/time formats..

=O2-K2

Use the above formula and format the cell to the below format. Right
clickFormat CellsCustom FormatType:=

[h]:mm:ss

If this post helps click Yes
---------------
Jacob Skaria


"Raj" wrote:

Hi All

I require a formula to compute the difference between 2 date stamps.
Here is
my requirement. We have time the issue is raised in K2 and target time
to
complete is in O2
for example
K2 : 5/29/2009 4:15:21 PM
O2: 6/1/2009 4:15:21 PM

The difference between this 2 must be 8 hours as we work from Monday to
friday
timings 9.00 to 17.00 daily.

Can anyone help me regarding this.

Raj







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Difference between 2 time stamps

Oops..Sorry I missed the actual query/. Thanks David for pointing that out

With start date in A1 and end date in B1 you can try...

=((B1-WEEKDAY(B1,2)+WEEKDAY(A1,2)-A1)/7*5-MIN(5,WEEKDAY(A1,2))+MIN(5,WEEKDAY(B1,2)))*("17:00 "-"09:00")+MOD(B1,1)-MOD(A1,1)

If this post helps click Yes
---------------
Jacob Skaria


"David Biddulph" wrote:

For me that gives 72 hours, not the 8 hours that Raj requested.
It doesn't take account of the 8 hour working day, nor does it allow for
weekends.
--
David Biddulph

"Jacob Skaria" wrote in message
...
If O2 and K2 are in date/time formats..

=O2-K2

Use the above formula and format the cell to the below format. Right
clickFormat CellsCustom FormatType:=

[h]:mm:ss

If this post helps click Yes
---------------
Jacob Skaria


"Raj" wrote:

Hi All

I require a formula to compute the difference between 2 date stamps. Here
is
my requirement. We have time the issue is raised in K2 and target time to
complete is in O2
for example
K2 : 5/29/2009 4:15:21 PM
O2: 6/1/2009 4:15:21 PM

The difference between this 2 must be 8 hours as we work from Monday to
friday
timings 9.00 to 17.00 daily.

Can anyone help me regarding this.

Raj




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
vlookup between two time stamps [email protected] Excel Worksheet Functions 1 October 22nd 08 06:58 PM
Time Stamps??????????? looper Excel Discussion (Misc queries) 0 March 2nd 07 11:14 PM
I need to find the yy/mm/dd AND hh:mm:ss between 2 time stamps Pontoon Excel Discussion (Misc queries) 5 June 22nd 06 01:23 PM
DIFFERENCE BETWEEN TWO TIME STAMPS AS DECIMAL Giulia Excel Discussion (Misc queries) 3 November 9th 05 12:57 PM
Difference between two Excel Date/Time Stamps lnapier Excel Worksheet Functions 7 June 30th 05 02:14 PM


All times are GMT +1. The time now is 05:04 AM.

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"