From RAD Studio API Documentation
Jump to: navigation, search


function DateTimeToXSDateTime(const Value: TDateTime; ApplyLocalBias: Boolean = False): TXSDateTime;


extern DELPHI_PACKAGE TXSDateTime* __fastcall DateTimeToXSDateTime(const System::TDateTime Value, bool ApplyLocalBias = false);


Type Visibility Source Unit Parent
function public
Soap.XSBuiltIns Soap.XSBuiltIns


Returns a TXSDateTime object that encodes a TDateTime value.

DateTimeToXSDateTime returns a TXSDateTime object that corresponds to a specified TDateTime value. The TXSDateTime object can be used to represent a date-and-time value on an invokable interface. As a remotable object, it can encoded in SOAP packets.

Value is the TDateTime value to convert. If the time zone information is important, this value is assumed to be given in Coordinated Universal Time (UTC).

CalcLocalBias indicates whether the TXSDateTime object should include offsets for converting Value to the local time zone. If CalcLocalBias is true, DateTimeToXSDateTime looks up the local time zone and uses it to set the HourOffset and MinuteOffset properties of the return value.

See Also