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

Change from Date / Time to Date data type

Status
Not open for further replies.

Kelser

Instructor
May 14, 2005
29
IE
In Crystal Reports 8.5 you could go to the File menu - Options - Reporting tab heading and click the down arrow beside 'Convert Date-Time field:' and choose 'To Date'. This facility is not available in Crystal Reports 9.0 or 10.0. Does anyone know how to carry out that same action in versions 9.0 and 10.0?
Many thanks
 
Since no one has answered, probably there is no way. You can always change a DateTime to Date format. Use the menu: File>options>Fields and change the [Date and Time] default to Date.

You can also use the 'format painter' to change existing fields. Or tricks like Totext({your.date}, "dd MMM yyyy") and similar

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Many thanks for your reply, I didn't think it was available, but hoped it was. That facility allowed me to create a parameter and set the Value type to 'Date' instead of 'Date/Time'. When I change it to 'Date' in the File - Menu - Options - Fields area in Version 9 or 10 it doesn't carry the setting through to a parameter so I end up having to put in the Value type as a Date/Time and entering a time in the parameter, which I'm trying to avoid. However, I'll certainly use your suggested formula. Thanks again.
 
My solution is to create a SQL Expression which CASTs or CONVERTs the column to a date type. then you can compare the date parameter to the date field and assure that the SQL passes to the database.

Of course this is database dependent, and since you didn't post your database type, I can't help you there.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top