[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Exclude weekends from date select

I have an application where contractors request off-hours staff.  They must enter a job date at least five BUSINESS days out.  Using similiar to the below script, I can get it to validate 5 days out, but that doesn't exclude weekends.   Thanks ahead of time for your advice.

<cfif getList.jobDate EQ #DateAdd("d", +2, thisDate)# OR
getList.jobDate EQ #DateAdd("d", +1, thisDate)# OR
getList.jobDate EQ #DateAdd("d", +0, thisDate)#>
*48 Hr
  • 2
1 Solution
Take a look at the BusinessDaysAdd(date, number) function at cflib.org
kbtudorAuthor Commented:
Excellent.  I sorted through Livedocs and couldn't find anything.  I didn't even think of CFIB.  This is exactly what I need - and FAST too!  Thanks again.
You are welcome.  Keep cflib.org bookmarked.  It probably has a function for just about any common task you'll ever need to perform ;-)

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now