Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

skip weekend dates

Status
Not open for further replies.

WHYDO4399

Technical User
Mar 3, 2009
7
US
Hello to everyone.
I have a report where I am looking at to provide a data 3 days out from the release date. However if the release date is for example Friday... I want to start the 1 data at Monday. I never want it to start counting Saturday or Sunday.

Is there an easy way to do this?
Thx,
 
As long as the releasedate can never be a Saturday or a Sunday, the following should work, although it doesn't account for holidays:

if dayofweek({table.releasedate}) > 3 then
dateadd("d",5,{table.releasedate}) else
dateadd("d",3,{table.releasedate})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top