Modifier

Partager via


JsonValue.AsDateTime() Method

Version: Available or changed with runtime version 1.0.

Converts the value in a JsonValue to a DateTime data type.

Syntax

Result :=   JsonValue.AsDateTime()

Parameters

JsonValue
 Type: JsonValue
An instance of the JsonValue data type.

Return Value

Result
 Type: DateTime

Remarks

If the JsonValue does not contain a string of the round-trip ("o") format, the operation will fail with a run-time error. For more information, see The round-trip ("O", "o") format specifier.

If there is no timezone specifier, the value will be treated as a UTC DateTime. If the timezone specifier is local, it will be treated as local to the server's timezone and converted to UTC. We recommend using UTC time to prevent unexpected behavior.

JsonValue Data Type
Get Started with AL
Developing Extensions