Subject | Date Calculation |
---|---|
Author | ra8009 |
Post date | 2005-05-10T15:40:16Z |
Where MYDATE is a timestamp field, I want to display the number of
days since a given date:
SELECT CAST(CAST('TODAY' as DATE)-CAST(MYDATE as DATE) FROM MYTABLE
However, this gives me an integer. When I try to cast it as a DATE I
get an error message:
"Conversion error from string 4302"
What a I doing wrong?
days since a given date:
SELECT CAST(CAST('TODAY' as DATE)-CAST(MYDATE as DATE) FROM MYTABLE
However, this gives me an integer. When I try to cast it as a DATE I
get an error message:
"Conversion error from string 4302"
What a I doing wrong?