User Tools

Site Tools


api:dk11:delphi:gisinternals.datetimetoxmlstring_tdatetime_integer_boolean

Table of Contents

DateTimeToXMLString method

DK11 for Delphi | GisInternals.DateTimeToXMLString | Enums | Fields | Methods | Types

Converts a TDateTime instance to a String in the native XML format (ISO 8601).

Syntax

// Delphi
function DateTimeToXMLString(
  _dtm : TDateTime;
  const _idt : Integer;
  const _btz : Boolean
) : String;
// C++ Builder
extern DELPHI_PACKAGE UnicodeString DateTimeToXMLString(
  TDateTime* _dtm,
  const int _idt,
  const bool _btz
);

Parameters

Name Type Description
_dtm TDateTime TDateTime instance to be converted
_idt Integer format identifier; if _idt <= 0, format = 'yyyy-MM-dd' _idt = 1, format = 'yyyy-MM-ddTHH:mm' _idt = 2, format = 'yyyy-MM-ddTHH:mm:ss' _idt >= 3, format = 'yyyy-MM-ddTHH:mm:ss.fffffff'
_btz Boolean if True then time zone String is added in the format 'zzz'; irrelevant if _idt <=0

Result

Type Description
String TDateTime as a String.
2017/09/04 11:15