System.JSON.Writers.TJsonTextWriter.DateFormatHandling

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DateFormatHandling: TJsonDateFormatHandling read FDateFormatHandling write FDateFormatHandling;

C++

__property System::Json::Types::TJsonDateFormatHandling DateFormatHandling = {read=FDateFormatHandling, write=FDateFormatHandling, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.JSON.Writers.pas
System.JSON.Writers.hpp
System.JSON.Writers TJsonTextWriter

Description

Gets or sets how dates are written to JSON text.

DateFormatHandling indicates the format of TDateTime used to represent dates in JSON.

The possible values are: Iso, Unix, FormatSettings.

Iso: Date and time format as defined in ISO 8601. For example:

YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
//Complete date plus hours, minutes, seconds and a decimal fraction of a second

Unix: Timestamp that represents the number of seconds since 1970-01-01 00:00:00 UTC. For example:

1447320565 seconds since Jan 01 1970. (UTC)

FormatSettings: Rich formatting of a TDateTime variable into a string. It uses FormatDateTime to show the TDateTime value.

When you create an instance of TJsonTextWriter, DateFormatHandling is set to Iso.

See Also