SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual540440-003
9-35
CURRENT_DATE Function
CURRENT_DATE Function
The CURRENT_DATE function returns the local current date as a value of type DATE.
The CURRENT_DATE function returns the current date, such as 1997-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 2000-01-18
ROSS PRODUCTS 2000-02-02
MONTANA TOOLS 2000-03-03
AHAUS TOOL/SUPPLY 2000-03-03
THE WORKS 2000-02-02
THE WORKS 2000-02-02
--- 6 row(s) selected.
CURRENT_DATE