[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Encode a Hour,Min,Sec,millisec to a TDateTime value.
Source position: datih.inc line 110
function EncodeTime( |
Hour: Word; |
Minute: Word; |
Second: Word; |
MilliSecond: Word |
):TDateTime; |
EncodeTime encodes the Hour, Minute, Second, MilliSecond variables to a TDateTime format result. It does the opposite of the DecodeTime procedure.
The parameters must have a valid range (boundaries included):
In case one of the parameters is out of it's valid range, an EConvertError exception is raised.
|
Encode a Year,Month,Day to a TDateTime value. |
|
|
Decode a TDateTime to a hour,minute,second,millisec quartet |
Program Example12; { This program demonstrates the EncodeTime function } Uses sysutils; Var Hh,MM,SS,MS : Word; Begin DeCodeTime (Time,Hh,MM,SS,MS); Writeln ('Present Time is : ',FormatDateTime('hh:mm:ss',EnCodeTime (HH,MM,SS,MS))); End.
lazarus-ccr.sourceforge.net |