Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

  1. Home
  2. SQL Dictionary
  3. CURRENT_DATE / NOW

CURRENT_DATE / NOW

Functions and expressions for retrieving the current date or datetime. Use these when you need to reference the system clock in SQL.

Syntax

-- Returns the current date (standard SQL).
SELECT CURRENT_DATE;

-- Returns the current time (standard SQL).
SELECT CURRENT_TIME;

-- Returns the current datetime (standard SQL).
SELECT CURRENT_TIMESTAMP;

-- Returns the current datetime (MySQL function).
SELECT NOW();

-- Returns the datetime at the moment the query executes (MySQL).
SELECT SYSDATE();

Syntax List

SyntaxDescription
CURRENT_DATEReturns the current date as a DATE value (YYYY-MM-DD format). No parentheses are needed in standard SQL.
CURRENT_TIMEReturns the current time as a TIME value (HH:MM:SS format). No parentheses are needed in standard SQL.
CURRENT_TIMESTAMPReturns the current datetime as a TIMESTAMP value. No parentheses are needed in standard SQL.
NOW()Returns the current datetime in MySQL. It returns the time at which the statement began executing.
SYSDATE()Returns the datetime at the moment of SQL execution in MySQL. Unlike NOW(), it may return a different value each time it is called within the same statement.

Sample Code

-- Retrieves the current date.
SELECT CURRENT_DATE AS today;

-- Retrieves the current datetime.
SELECT NOW() AS current_datetime;

-- Retrieves orders whose due date is today or later.
SELECT order_id, product_name, due_date
FROM orders
WHERE due_date >= CURRENT_DATE;

-- Inserts the current datetime into a record.
INSERT INTO access_logs (user_id, accessed_at)
VALUES (101, NOW());

-- Retrieves members whose membership has expired.
SELECT member_id, name, expire_date
FROM members
WHERE expire_date < CURRENT_DATE;

Result

-- Example result of: SELECT CURRENT_DATE AS today;
-- +------------+
-- | today      |
-- +------------+
-- | 2025-10-15 |
-- +------------+

-- Example result of: SELECT NOW() AS current_datetime;
-- +---------------------+
-- | current_datetime    |
-- +---------------------+
-- | 2025-10-15 14:32:07 |
-- +---------------------+

Syntax by Database

CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP are standard SQL expressions supported by MySQL, PostgreSQL, and SQLite.

SELECT CURRENT_DATE;
SELECT CURRENT_TIMESTAMP;

In Oracle, CURRENT_DATE returns a datetime value. If you only need the date portion, use TRUNC(SYSDATE). To retrieve the current datetime, use SYSDATE.

-- Retrieves the current datetime (Oracle).
SELECT SYSDATE FROM DUAL;

-- Retrieves the current timestamp (Oracle).
SELECT CURRENT_TIMESTAMP FROM DUAL;

In SQL Server, CURRENT_TIMESTAMP is available. For higher-precision datetime values, use SYSDATETIME(). Since CURRENT_DATE is not supported, use CAST(GETDATE() AS DATE) as an alternative.

-- Retrieves the current datetime (SQL Server).
SELECT CURRENT_TIMESTAMP;
SELECT GETDATE();

-- Retrieves the current date only (SQL Server).
SELECT CAST(GETDATE() AS DATE);

Notes

CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP are expressions defined in standard SQL and work in both MySQL and PostgreSQL. NOW(), on the other hand, is a MySQL-specific function that returns the time at which the statement began. It returns the same value across multiple calls within a transaction, ensuring consistency.

SYSDATE() returns the actual time of SQL execution, so it may return different values within the same statement each time it is called. In most cases, using NOW() is the safer choice.

To add or subtract dates, see DATE_ADD / DATEDIFF. To extract the year or month from a date, see EXTRACT / FORMAT.

If you find any errors or copyright issues, please .