[Overview][Constants][Types][Classes][Procedures and functions][Variables] |
Encode a Year,Month,Day to a TDateTimevalue.
Source position: datih.inc line 101
function EncodeDate( |
Year: Word; |
Month: Word; |
Day: Word |
):TDateTime; |
EncodeDateencodes the Year, Monthand Dayvariables to a date in TDateTimeformat. It does the opposite of the DecodeDateprocedure.
The parameters must lie withing valid ranges (boundaries included):
In case one of the parameters is out of it's valid range, an EConvertErrorexception is raised.
|
Encode a Hour,Min,Sec,millisec to a TDateTimevalue. |
|
|
Decode a TDateTimeto a year,month,day triplet |
Program Example11; { This program demonstrates the EncodeDate function } Uses sysutils; Var YY,MM,DD : Word; Begin DecodeDate (Date,YY,MM,DD); WriteLn ('Today is : ',FormatDateTime ('dd mmmm yyyy',EnCodeDate(YY,Mm,Dd))); End.