TsgcWSPServer_DatasetProperties › FormatSettings

FormatSettings Property

Date, time and numeric format settings used when serialising field values.

Syntax

property FormatSettings: TsgcWSDatasetFormatSettings read FFormatSettings write SetFormatSettings;

Default Value

Remarks

Controls how TDateTime, TDate, TTime, Float and Currency fields are encoded in the JSON envelope that travels on the wire. Set DateSeparator, TimeSeparator, ShortDateFormat, LongTimeFormat, DecimalSeparator and ThousandSeparator so the format matches whatever the clients expect; otherwise the host locale is used. Keep client and server FormatSettings in sync to avoid conversion errors.

Example

oProtocol.FormatSettings.DateSeparator := '-';
oProtocol.FormatSettings.ShortDateFormat := 'yyyy-mm-dd';
oProtocol.FormatSettings.DecimalSeparator := '.';

Back to Properties