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

Report to return data for previous Monday through Friday weekday

I have a report that runs Monday through Friday identifying employees with a hire date the previous weekday.  For example when the report runs Monday, I need it to pick up hire dates from the previous Friday.  Report runs Tuesday it picks up Monday hires, report runs Wednesday, it picks up Tuesday's hires, etc.  Thanks for your support.
0
jph826
Asked:
jph826
1 Solution
 
mlmccCommented:
Do you need to handle holidays?

Try this idea

If DayofWeek(CurrentDate) = crMonday then
    {DateFIeld} = Currentdate - 3
Else
    {DateField} = CurrentDate - 1

mlmcc
0
 
jph826Author Commented:
Holidays would not be a consideration in this case, but what a great question!  I had not thought of that.  Your suggestion worked great.  Thanks for your support!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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