Sign in Join
FPDoc Onlineexperiment

SecondOfTheMinute function

In unit DateUtils

Calculate the number of seconds elapsed since the start of the minute.

Declaration

pascal
function SecondOfTheMinute(const AValue: TDateTime): Word

Arguments

AValue

Moment in the minute.

Function result

Number of seconds elapsed since the start of the minute.

Description

SecondOfTheMinute returns the number of seconds that have passed since the start of the minute (HH:MM:00) till the moment indicated by AValue. This is a zero-based number, i.e. HH:MM:00.999 return 0.

See also

Example: ex45

pascal
Program Example45;

{ This program demonstrates the SecondOfTheMinute function }

Uses SysUtils,DateUtils;

Var
  N : TDateTime;

Begin
  N:=Now;
  Writeln('Second of the Minute      : ',SecondOfTheMinute(N));
  Writeln('MilliSecond of the Minute : ',
          MilliSecondOfTheMinute(N));
End.

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