Sign in Join
FPDoc Onlineexperiment

DecodeDate procedure

In unit sysutils

Decode a TDateTime to a year,month,day triplet.

Declaration

pascal
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

Example: ex9

pascal
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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.