I need to filter a crystal report by a date range where the dates in question are stored in an SQL table, in a field of type 'text'. (Crystal actually sees it as type "memo") I found out in a hurry that I couldn't actually use that field directly in the select criteria. So I thought I would write a simple formula (see code section) to convert the string date into a datetime format so that i could use the formula in the select criteria. I can see that the conversion seems to work ok by adding the output of the formula to the body of the report and things seem ok. It takes text like 03/04/2008 and changes it to 3/4/2008 12:00:00AM
I can use the select expert to add the formula as a field in the select criteria and it seems to work well as I say field is between and can pick two datetimes with no problems, then it asks if i want to refresh the data, and when it does, it generages the error: "Bad date-time format string."
Any help would be greatly appreciated.
// where the field below is the one with the date stored in text format