Skip to content

Obtain the current date, time, date and time, time zone, local time, and local timestamp

Use the current_date function to obtain the current date. Use the current_time function to obtain the current time. Use the current_timestamp function to obtain the current date and time. Use the current_timezone function to obtain the time zone. Use the localtime function to obtain the local time. Use the localtimestamp function to obtain the local timestamp. The results are displayed in a table.

SQL
|
select
  current_date as "Current date",
  current_time as "Current time",
  current_timestamp as "Current date and time",
  current_timezone() as "Time zone",
  localtime as "Local time",
  localtimestamp as "Local timestamp"