datetimefromparts

Returns a date-time value with given numerical year, month, day, hour, minute, second values.

Function

result = datetimefromparts(year, month, day, hour, minute, second)

Arguments

ArgumentData Type
yearinteger
monthinteger
dayinteger
hourinteger
minuteinteger
secondinteger
resultdatetime

Comments

Converts individual numbers into a date result.

The values provided to this function are interpreted according to the local time-zone. See Dates, Times and Time Zones.

Examples

result = datetimefromparts(2019,1,10,2,55,31) /* result is 02:55:31 on 10 January 2019 */