DATETIME

Creates a datetime based on the provided year, month, day, hour, minute, and second values

Updated over a week ago

Description

The DATETIME() function generates a datetime by combining the specified year, month, day, hour, minute, and second values. This is useful for creating precise datetime records or working with timestamped data.

Syntax

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

Output

datetime

Variables

  1. year: The numeric value representing the year (e.g., 2023).

  2. month: The numeric value representing the month (1 for January, 2 for February, and so on).

  3. day: The numeric value representing the day of the month.

  4. hour: The numeric value representing the hour (0-23).

  5. minute: The numeric value representing the minute (0-59).

  6. second: The numeric value representing the second (0-59).

Example

DATETIME(`Year`, `Month`, `Day`, `Hour`, `Minute`, `Second`)

Event

Year

Month

Day

Hour

Minute

Second

DATETIME

Event A

2023

9

15

10

30

45

2023-09-15T10:30:45.000

Event B

2023

8

25

14

15

0

2023-08-25T14:15:00.000

Event C

2023

9

1

9

0

20

2023-09-01T09:00:20.000

Did this answer your question?