#datetime

Syntax

#datetime(year as number, month as number, day as number, hour as number, minute as number, second as number) as any

Description

Creates a datetime value from whole numbers year year, month month, day day, hour hour, minute minute, and (fractional) second second. Raises an error if these are not true:

1 ≤ year ≤ 9999
1 ≤ month ≤ 12
1 ≤ day ≤ 31
0 ≤ hour ≤ 23
0 ≤ minute ≤ 59
0 ≤ second ≤ 59

Reference Data

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference

Power Query M Functions / DateTime Functions / #datetime