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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Work week date

Status
Not open for further replies.

kss444

Programmer
Joined
Sep 19, 2006
Messages
306
Location
US
I am very new to using crystal reports and I am not sure how to go about this but what I need is:

A formula that will only display the previous work day's date, excluding weekends and holidays.

Does anyone know how to do this? or is there a built in formula that does this.

Thanks for any help.
 
Please post some technical information as the post states work week, then changes to a previous work weeks date excluding weekends, not sure what a work week has to do with a previous work weeks date.

To get a week ago from today, just use:

currentdate-7

To get the workweek for a date use:

datepart("ww",{table.date})

To work with busines days have a look at Ken Hamday's (one of the Crystal masters here) formula:


Hard to know what you want from the post.

-k
 
I found and I am reading KenHamady.com's articles on dates. I have a report with today's (date printed) date it but the actual information is from the the day prior. On a Monday - Friday work week.
Examples: If the report was ran (printed) on Thursday 9/28/2006 it I need to show a date of 9/27/2006.
If the report was printed on a Monday 9/25/2006 the report should show a date of Friday 9/22/2006.

And I also have to take into account all holiday's that fall within a work week (Easter, Chrismas ect).

Hope this makes more sense.
 
Use formula 17 and subtract 1. This will give you the date you are looking for.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top