Converts years, months, days, hours, minutes and seconds to date and time values.
DATETIME(years, months, days, hours, minutes, seconds)
(date, time) = DATETIME(years, months, days, hours, minutes, seconds)
years |
- |
A scalar or series, the year values. |
months |
- |
A scalar or series, the month values. |
days |
- |
A scalar or series, the day values. |
hours |
- |
A scalar or series, the hours values. |
minutes |
- |
A scalar or series, the minutes values. |
seconds |
- |
A scalar or series, the seconds values. |
A datetime series where the data and time values are in two adjacent columns.
(date, time) = DATETIME(years, months, days, hours, minutes, seconds) returns the date and time in two separate variables.
W1: datetime()
W1 contains the current datetime.
W2: datetime(2030, 10, 31, 12, 0, 0)
W2 contains the datetime series:
10/31/2030 12:00:00
(d, t) = datetime(2030, 10, 31, 12, 0, 0)
Same as above, except the date and time are returned to the variables d and t.
W3: datetime(2030, 10, 32, 12, 0, 70)
W3 contains the datetime series:
11-01-2030 12:01:10
The day value wraps around and the seconds value wraps around.
W4: datetime(2030..2034, 4, 1..5, 12, 10..14, 0)
W4 contains the datetime values:
4/01/2030 12:10:00
4/02/2031 12:11:00
4/03/2032 12:12:00
4/04/2033 12:13:00
4/05/2034 12:14:00
DATETIME converts years, months, days, hours, minutes and seconds to a datetime series.
A datetime series consists of 2 columns of values where the first column contains integer Julian dates starting at midnight and the second column contains time in seconds starting from midnight.
See DT2YMDHMS to convert a date time series to series of years, months, days, hours, minutes, seconds.
DATETIME is identical to YMDHMS2DT.