Date2ISOStr Function
Returns Date as a Basic Format for ISO Dates: YYYYMMDD where YYYY is year, MM is the Month, DD is Day of Month.

Unit
QESBPCSDateTime

Declaration
Function Date2ISOStr(const DT: TDateTime): string;

Description
Zero Padded.

Parameters
DT Date to process.

Category
Date/Time Conversion Routines

Implementation

function Date2ISOStr (const DT: TDateTime): string;
var
     D, M, Y: Integer;
     Hold: Boolean;
begin
     OptDecodeDateI (DT, Y, M, D);
     Hold := ESBBlankWhenZero;
     ESBBlankWhenZero := False;
     try
          Result := Int2ZStr (Y, 4) + Int2ZStr (M, 2)
               + Int2ZStr (D, 2);
     finally
          ESBBlankWhenZero := Hold;
     end;
End;


HTML generated by Time2HELP
http://www.time2help.com