Neoview SQL Reference Manual (R2.4 SP2)
CURRENT_DATE Function
The CURRENT_DATE function returns the local current date as a value of type DATE.
The function is evaluated once when the query starts execution and is not reevaluated (even if
it is a long running query).
CURRENT_DATE
The CURRENT_DATE function returns the current date, such as 2008-09-28. The value returned
is a value of type DATE, not a string value.
Examples of CURRENT_DATE
• Select rows from the ORDERS table based on the current date:
SELECT * FROM sales.orders
WHERE deliv_date >= CURRENT_DATE;
• The PROJECT table has a column EST_COMPLETE of type INTERVAL DAY. If the current
date is the start date of your project, determine the estimated date of completion:
SELECT projdesc, CURRENT_DATE + est_complete
FROM persnl.project;
Project/Description (EXPR)
------------------- ----------
SALT LAKE CITY 2008-01-18
ROSS PRODUCTS 2008-02-02
MONTANA TOOLS 2008-03-03
AHAUS TOOL/SUPPLY 2008-03-03
THE WORKS 2008-02-02
THE WORKS 2008-02-02
--- 6 row(s) selected.
362 SQL Functions and Expressions