Mega Code Archive

 
Categories / Delphi / Algorithm Math
 

Decode a TDate typ

Title: decode a TDate typ? procedure TForm1.Button1Click(Sender: TObject); const Year, Month, Day: Word; begin // Date = 12/12/2001 DecodeDate(Date, Year, Month, Day); Label1.Caption := IntToStr(Year); // 2001 Label2.Caption := IntToStr(Month); // 12 Label3.Caption := IntToStr(Day); // 12 end;