Is it possible to have a query in DB2 that compares a value in a text field to the current system date?
select *
from table
where DOB < [current system time]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Based on your question, I’m guessing that your column has data formatted like this:
‘DD/MM/YYYY HH:MI:SS’
If you are using DB2 9.7 and higher, you can use to_date, which is a lot like Oracle’s to_date
i haven’t tested the above query.