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

Date parameter format query.

Status
Not open for further replies.

Secretgeek

Technical User
Jan 3, 2008
80
GB
Hello,

I've looked around the forum but have been unable to find an answer to this question.

I'm using CRXI and have created a daterange parameter to select records. The issue I have is when the parameter prompt window runs it asks for the date to be entered in the following format 'yyyy-mm-dd'.

This is odd given that all my settings have Date as 'dd-mm-yy'

What can I do to bring the parameter into line with the rest of CR? It seems like a bit of an anomaly.

Thanks in advance for your help.
 
Use a string parameter and a mask

Create str Param

In Default set mask ##/##/##
Enter default date 01/01/09

In Select expert

DateField = CDate({?Param})

Ian
 
Thanks Ian but I'm struggling a little with this.

I've got it working fine for 1 specific day but I need the report to cover a range. If I set 'Allow Range' to True the value being returned by {?param} seems to no longer be evaluated as a date by CDate and I'm getting an error.

Would you recommend creating two parameters one each for Start and End of the required period and working from there?

 
Yes you will need two such parameters. If you use True date parameters then you can use a range. CDATE will only work on one date at a time.

Ian
 
Thanks Ian, I've got that working.

Not wild about the look of the parameter prompt boxes but I've not the knowledge or time to be looking at that! :)

Thanks again for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top