I replied to something like this a couple of days ago, but it didn't make it
through.

You can do this in sql server 7.0 (assuming that Saturday and Sunday are NOT
business days.)
Replace [begindate] and [enddate] with your dates


Select count(*) as daycount
>From DateTable
Where DateTable.EntryDatetime >= [beginnindate] AND DateTable.EntryDateTime
<= [enddate]
AND ((DateName(dw, DateTable.EntryDatetime) != 'Saturday') AND (DateName(dw,
DateTable.EntryDatetime) != 'Sunday'))

Regards,
tim P.
-----Original Message-----
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 10:20 AM
To: CF-Talk
Subject: business dates


i need to get the number of business dates/hours between 2 user defined
dates.
i am using SQLServer.
does anyone know how to do this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to