ScriptCore3.DecodeDate

From Soldat Community Wiki
Jump to: navigation, search
procedure DecodeDate(const DateTime: TDateTime; var Year, Month, Day: Word);
 DateTime: TDateTime that is supposed to be decoded
 Year: Year based on DateTime
 Month: Month based on DateTime
 Day: Day based on DateTime

Description

This function will decode given TDateTime into Year, Month and Day.

Example

var
  y,m,d: Word;

begin
  DecodeDate(71001,y,m,d);
  {
  y = 2094
  m = 5
  d = 22
  }
  WriteLn(inttostr(y));
  WriteLn(inttostr(m));
  WriteLn(inttostr(d));
end.