Removing weekends from a date range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that contains two fields (OrigDateTime and TermDateTime

If the date_time stamp in orig is Friday 02/20/2004 11:00:00 A
and the date_time stamp for term is Monday 02/23/2004 11:00:00 A

I would calculate the duration between the two dates as so
((term - Orig) * 86400 = 259200 seconds
This will give me total number of seconds from start to end

But I need to remove the duration of time that is weekend time
The answer should be
((term - Orig) * 86400 = 86400 seconds

Any thoughts?
 
Check the http://www.mvps.org website for some tips on business days.
Specifically: http://www.mvps.org/access/datetime/date0006.htm

I'm thinking that you could do something like subtract the non-working day
seconds from the total seconds to get to your desired goal.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top