ROUTMIO_DEV

TOOLS

DDL GeneratorDDL → ERDDummy Data GeneratorRegex TesterJSON FormatterBase64 ConverterTimestamp ConverterCron BuilderMeeting Minutes

DATABASE

LANGUAGE

PostgreSQL Date/Time Functions

14 functions

NOWNOW()

Returns the current date and time.

CURRENT_DATECURRENT_DATE

Returns the current date.

CURRENT_TIMECURRENT_TIME

Returns the current time.

CURRENT_TIMESTAMPCURRENT_TIMESTAMP

Returns the current timestamp.

EXTRACTEXTRACT(field FROM source)

Extracts a specific field from a date/time value.

DATE_PARTDATE_PART('field', source)

Returns a specific field of a date/time as a number.

DATE_TRUNCDATE_TRUNC('field', source)

Truncates a date/time to the specified precision.

TO_DATETO_DATE(str, format)

Converts a string to a date.

TO_TIMESTAMPTO_TIMESTAMP(str, format)

Converts a string to a timestamp.

TO_CHARTO_CHAR(date, format)

Converts a date/time to a formatted string.

AGEAGE(ts2, ts1)

Returns the interval between two timestamps.

MAKE_DATEMAKE_DATE(year, month, day)

Creates a date from year, month, and day.

MAKE_INTERVALMAKE_INTERVAL([...units])

Creates an interval from unit components.

CLOCK_TIMESTAMPCLOCK_TIMESTAMP()

Returns the current real-time timestamp.

Terms of ServicePrivacy PolicyContactIcons by Flaticon