Table of Contents

GetDateTimeFromEpoch Procedure

Codeunit JSON Functions

Reads the value at Path and returns the value as DateTime. The value is expected to be in Unix Timestamp format. An error will be thrown if the value doesn't exist.

Overloads

Name Description
GetDateTimeFromEpoch(JsonObject; Text): DateTime Reads the value at Path and returns the value as DateTime.
GetDateTimeFromEpoch(JsonObject; Text; Boolean): DateTime Reads the value at Path and returns the value as DateTime.

GetDateTimeFromEpoch(JsonObject; Text) Procedure

Reads the value at Path and returns the value as DateTime. The value is expected to be in Unix Timestamp format. An error will be thrown if the value doesn't exist.

Signature

GetDateTimeFromEpoch(JsonObj: JsonObject; Path: Text) : DateTime

Parameters

JsonObj JsonObject

The JsonObject to read from.

Path Text

The JSONPath expression that will be used to get the requested value.

Returns

DateTime

The value found at Path as DateTime.

GetDateTimeFromEpoch(JsonObject; Text; Boolean) Procedure

Reads the value at Path and returns the value as DateTime. The value is expected to be in Unix Timestamp format.

Signature

GetDateTimeFromEpoch(JsonObj: JsonObject; Path: Text; DefaultIfUndefined: Boolean) : DateTime

Parameters

JsonObj JsonObject

The JsonObject to read from.

Path Text

The JSONPath expression that will be used to get the requested value.

DefaultIfUndefined Boolean

If true an error is not thrown if the value doesn't exist. Instead a blank datetime is returned. If false an error is thrown if the value doesn't exist.

Returns

DateTime

The value found at Path as DateTime.

This documentation is generated from Smart Toolbox v27.1