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!

Date Question

Status
Not open for further replies.

slickp

Technical User
Feb 15, 2006
35
GB
Using Crystal Reports XI

Hi, i've got a date field in my report which is data inputted manually by the user, however sometimes they get the year wrong, so i've changed my report to allow for current risks only, so my parameter i would like to be able to pick only the day and month and ignore the year. ie for november the user can choose the range 01/11 to 30/11. So hopefully that would pick up anything for november regardless of what year is in my date field.

I thought of a totext({@date}, "ddMM"), but obviously you couldn't do a range of dates on this in a parameter.

Any ideas please?
 
If you just want the current month, you can get this using
Code:
Year({your.date}) = Year(currentdate)
and MOnth({your.date}) = MOnth(currentdate)
FOr something more compelex, look at DatePart.



[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top