[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

DecodeDate

Decode a TDateTime to a year,month,day triplet

Declaration

Source position: datih.inc line 112

procedure DecodeDate(

  Date: TDateTime;

  out Year: Word;

  out Month: Word;

  out Day: Word

);

Description

DecodeDate decodes the Year, Month and Day stored in Date, and returns them in the Year, Month and Day variables.

Errors

None.

See also

EncodeDate

  

Encode a Year,Month,Day to a TDateTime value.

DecodeTime

  

Decode a TDateTime to a hour,minute,second,millisec quartet

Example

Program Example9;

{ This program demonstrates the DecodeDate function }

Uses sysutils;

Var YY,MM,DD : Word;

Begin
  DecodeDate(Date,YY,MM,DD);
  Writeln (Format ('Today is %d/%d/%d',[dd,mm,yy]));
End.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.