Sign in Join
FPDoc Onlineexperiment

MinuteOfTheHour function

In unit DateUtils

Calculate the number of minutes elapsed since the start of the hour.

Declaration

pascal
function MinuteOfTheHour(const AValue: TDateTime): Word

Arguments

AValue

Moment in the hour.

Function result

Number of minutes elapsed since the start of the hour.

Description

MinuteOfTheHour returns the number of minutes that have passed since the start of the Hour (HH:00:00) till the moment indicated by AValue. This is a zero-based number, i.e. HH:00:59 will return 0.

See also

Example: ex44

pascal
Program Example44;

{ This program demonstrates the MinuteOfTheHour function }

Uses SysUtils,DateUtils;

Var
  N : TDateTime;

Begin
  N:=Now;
  Writeln('Minute of the Hour      : ',MinuteOfTheHour(N));
  Writeln('Second of the Hour      : ',SecondOfTheHour(N));
  Writeln('MilliSecond of the Hour : ',
          MilliSecondOfTheHour(N));
End.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.