Date

The Date() function accepts numeric values for each part of a date, optionally with time, and returns it as a datetime value.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Syntax

Date(year, month, day)

Date(2022, 2, 17) =>Result: February 17, 2022

Date(1999, 15, 88) =>Result: unknown

Date(year, month, day, hour, minute)

Date(2022, 2, 17, 11, 15) =>Result: February 17, 2022 11:15

Date(2022, 2, 17, 50, 50) =>Result: unknown

Date(year, month, day, hour, minute, second)

Date(2022, 2, 17, 11, 15, 22) =>Result: February 17, 2022 11:15:22

Date(2022, 2, 17, 15, 80, 80) =>Result: unknown

Parameters

Name
Type
Required
Description

year

numeric

☑️

the year unit

month

numeric

☑️

the month unit (1 - 12)

day

numeric

☑️

the day unit (1 - 31)

hour

numeric

the hour unit (0 - 23)

minute

numeric

the minute unit (0 - 59)

second

numeric

the second unit (0 - 59)

Last updated

Was this helpful?