I have a query expression in Cognos where I need to compare a past date to the current date. I don’t see one in the functions list and I’m otherwise unsure how to put the query date inside a query object.
How can I use the current date in a query?
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.
Depending on your Database software, the object will be either be
current_date(SQL Server) orSYSDATE{}(Oracle). If you don’t know which you have, just make an expression of just the function and press the Validate button; if you get an error, you used the wrong function for your database.You can then use this object like any other Date query object, so you can add/compare it to dates in your query or display it somewhere on the page.