I have a SQL command in crystal reports (its OK if your not familiar with crystal) and I need to convert a date parameter to a decimal (to match a column in the database.)
SELECT decimaldate FROM TABLE1 WHERE decimaldate = {?normaldate}
--ex: 12/01/2011 needs to become 12012011
IF I use a CAST on the above query it doesn’t work:
SELECT decimaldate FROM TABLE1 WHERE decimaldate =
CAST(CAST{?normaldate} AS VARCHAR) AS DECIMAL)
Try something like this.
Or something like this where @normaldate is the search date.