Converts the value of the given DateTime object to local time.

Syntax

Smartsite SXML CopyCode image Copy Code
datetime datetime.tolocaltime(datetime dt)

Parameters

Name Data Type Description
dt DateTime A DateTime.

Return Value

Data Type Description
DateTime A DateTime based on local time, whose value is the local time equivalent to the value of the given DateTime, or DateTime.MaxValue if the converted value is too large to be represented by a DateTime, or DateTime.MaxValue if the converted value is too small to be represented by a DateTime.

Expand image Example

SXML