DecodeTime

Decode a TDateTime to a hour,minute,second,millisec quartet

Declaration

Source position: datih.inc line 124

  procedure DecodeTime(Time: TDateTime; out Hour: Word; out Minute: Word; 
                      out Second: Word; out MilliSecond: Word);

Description

DecodeTime decodes the hours, minutes, second and milliseconds stored in Time, and returns them in the Hour, Minute and Second and MilliSecond variables.

Errors

None.

See also

Name Description
DecodeDate Decode a TDateTime to a year,month,day triplet
EncodeTime Encode a Hour,Min,Sec,millisec to a TDateTime value.

Example

Program Example10;
{ This program demonstrates the DecodeTime function }
Uses sysutils;
Var HH,MM,SS,MS: Word;
Begin
  DecodeTime(Time,HH,MM,SS,MS);
  Writeln (format('The time is %d:%d:%d.%d',[hh,mm,ss,ms]));
End.