Creates a datetime from the given value.
function (optional
value
as nullable any, optionalculture
as nullable any) as nullable any
Returns a datetime
value from the given value
. If the given value
is null
, DateTime.From
returns null
. If the given value
is datetime
, value
is returned. Values of the following types can be converted to a datetime
value:
If value
is of any other type, an error is returned.
DateTime
Convert #time(06, 45, 12)
to a datetime
value.
DateTime.From(#time(06, 45, 12))
Convert #date(1975, 4, 4)
to a datetime
value.
DateTime.From(#date(1975, 4, 4))