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

Query for specific days within a date range in Crystal Reports XI

Hello Experts,
I am working on a Crystal Report (version XI) that queries an Oracle database. The report is pulling records from the database that have a date field that falls within a specified date range. I need to pull these records within the specified date range, but only for dates that fall on a Monday, Tuesday, or Wednesday. Is it possible to query for specific days in the record selection statement?  Thanks.
0
Janice Smith
Asked:
Janice Smith
1 Solution
 
UnifiedISCommented:
Use the DatePart function
DatePart("w", yourdatefield) IN [2,3,4]

w = weekday
crystal uses 1-7 to describe the days of the week,  You may have to adjust the 2,3,4 to get the right days depending on how you have the firstDayOfWeek configured within CR
0
 
Janice SmithSystems AnalystAuthor Commented:
Perfect!!  Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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