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

Wildcards in date

Status
Not open for further replies.

Shanna

Technical User
Apr 30, 2001
6
GB
Hi all,

Is there a way of incoprporating a wildcard into a date? For example, using the datre formula (where the asterix * is the wildcard) :

If month (start) = Date (year(CurrentDate),2,*)

I need to calculate the current year, month 2, but any day within that month.

Does anyone have a suggestion?

Many thanks,
Shanna
 
I would use:
(year({@date})=year(CurrentDate) and
month({@date})=2) Mike

 
"If month (start) = Date (year(CurrentDate),2,*)

I need to calculate the current year, month 2, but any day within that month."

Sorry but this does not make a lot of sense to me...

Month(start) is a function giving you the month of a date/dateTime variable called "start".

I don't see how you can compare it to a complete date...wildcard or no wildcard.

I think you need to give us more details about what you are trying to do.
 
R&R Report writer had wild cards for date literals, but CR doesn't. Mbarron's approach is correct, where you simply compare the other 2 values of the date, and ignore the third (wild) value. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top