Updated on 2026-11-06 GMT+08:00

getdate

The getdate function is used to return the current system time. The return value format is yyyy-mm-dd hh:mi:ss.

Similar function: current_date. The current_date function returns the current date value. The return value format is yyyy-mm-dd.

Syntax

getdate()

Parameters

None

Return Values

Returns a date value of type STRING, in the format yyyy-mm-dd hh:mi:ss.

Example Code

Assuming the current time is 2023-08-10 10:54:00, returns 2023-08-10 10:54:00.

select getdate();