[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

DecodeTime

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

Declaration

Source position: datih.inc line 122

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

EncodeTime

  

Encode a Hour,Min,Sec,millisec to a TDateTime value.

DecodeDate

  

Decode a TDateTime to a year,month,day triplet

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.

Documentation generated on: Sep 28 2017