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

Dates Problem

Status
Not open for further replies.

fragglemoo

IS-IT--Management
Nov 20, 2002
41
0
0
GB
Hi

CR2008.

I have some data consisting of a reference no and 3 dates.

CR123 15/1/2008 10/10/2008 11/10/2008
CR345 15/1/2008 16/1/2008 17/4/2008
IR789 16/10/2008 17/10/2008 19/5/2008

What I've been asked to do is to pull off the records where 1 or more of the dates is in a certain month. e.g October and I would get this back

CR123 15/1/2008 10/10/2008 11/10/2008
IR789 16/09/2008 17/10/2008 19/5/2008

Is this possible?

Thanks
 
In select statement and

(month(date1) = 10 or month(date2) = 10 or month(date2) = 10
)

This might be slow to execute as I do not think Crystal will parse this formula to server, so all data will be brought back and filtered within the report.

Ian
 
If you create SQL expressions using the month function for each date and then use them in the record selection formula, then Ian's formula should pass to the server. You can use a number parameter for the month, and if your data includes multiple years, you should address that in your formula, too.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top