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

SQL Date format and crystal date range CR.5

Status
Not open for further replies.

vincer

Programmer
Mar 12, 2002
45
0
0
GB
If I have a date range parameter that I use in the record selection formula Eg:

MyTable.Date IN {?Date Range}

Crystal generates an sql statement such as

SELECT MyTable.Date
FROM
MyTable MyTable
WHERE
MyTable.Date >= "2002/5/1 00:00:00AM" AND
MyTable.Date < &quot;2002/5/30 00:00:00AM&quot;

This doesn't return anything because it seems incompatible with the SQL DATEFORMAT which should be DMY (british). Is there a way this can be set in crystal.
I know you can type &quot;SET DATEFORMAT YMD&quot; in SQL query analyser but I don't know how to do it in CR8.5

Incidently if I change the last line to
MyTable.Date < &quot;2002/6/1 00:00:00AM&quot;
it seems to work which means I don't know what the default date format is

Thanks

Vince
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top