I can get # of days between Current Date and YYYYMMDD date (packed 8,0) with:
But get an error if I try to use that in a WHERE clause.
I tried to cast the Number of days result as INT, but also fails
Suggestions ?
Date field is Packed 8,0
Code:
SELECT Days(Current_Date) - Days(My_YMD_Field concat '000000') FROM MyTable
Code:
SELECT Days(Current_Date) - Days(My_YMD_Field concat '000000') FROM MyTable WHERE Days(Current_Date) - Days(My_YMD_Field concat '000000') < 10 (also tried '10')
Code:
where CAST(Days(Current_Date) - Days(My_YMD_Field concat '000000') as INT) < 10
Date field is Packed 8,0
Comment