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!

Reversing Parameter Date from yyyy-mm-dd

Status
Not open for further replies.

MikeMV

MIS
May 15, 2006
131
US
I am using CR IX and setup a couple of parameters to request a date. The date format on the parameter screen comes up as yyyy-mm-dd. I would like to have that show up as mm-dd-yyyy. I tried changing the field date options in CR Options and the Windows default short and long date, but that does not work.

Is there a way to accomplish this without changing the parameter to a string and doing the conversion?

Thanks in advance for your response.

Miguel.
 
The parameter prompt formats (I think) are coded into CR and cannot be changed.

However, you can get around this by creating a string parameter and letting your users enter the data in your mm-dd-yyyy format (just be sure to use an edit mask so they can't enter letters).

Then in your record selection, you can have a formula that converts the String into a Date for your database using the DateValue() function:


{Employee.Hire Date} = DateValue({?MyStringDateParam})
 
Note also that they can click the calendar icon and choose the date from the calendar control.

The default date format is a pain in the arse, hopefully they'll correct it in a future version.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top