chris-uk-lad
Registered User.
- Local time
- Today, 14:21
- Joined
- Jul 8, 2008
- Messages
- 271
Hi all,
Having a lil trouble with a query. Im trying to returns results where the difference between OldDate and "2009-05-27" is less than or equal to 20 years. The issue i have is that OldDate is a text string (import from csv), and i dont believe CDate works in SQL.
Maybe just a minor thin im missing but my mind hasn't clicked to it yet.
Thanks
Having a lil trouble with a query. Im trying to returns results where the difference between OldDate and "2009-05-27" is less than or equal to 20 years. The issue i have is that OldDate is a text string (import from csv), and i dont believe CDate works in SQL.
Code:
SELECT *
FROM INFO
WHERE DateDiff('yyyy',OldDate,"2009-05-27") <=20;
Maybe just a minor thin im missing but my mind hasn't clicked to it yet.
Thanks