Here's some SQL-2000 code to get you started; it works, but will need some
tweaking to meet your specific requirements.
declare @mystart smalldatetime
declare @myend smalldatetime
declare @businessHoursPerDay tinyint
declare @myHolidayCount tinyint
select @mystart = '01-12-01', @myend = '01-22-01', @businessHoursPerDay = 8
select @myHolidayCount = count(*) from <table of holidays> where <holiday
date field> BETWEEN @myStart AND @myEnd
select ((dateDiff(d,@mystart,@myend) - (dateDiff(wk,@mystart,@myend)*2)) -
@myHolidayCount) * @businessHoursPerDay
-----Original Message-----
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 9: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