Sign in Join
FPDoc Onlineexperiment

IncMinute function

In unit DateUtils

Increase a TDateTime value with a number of minutes.

Declaration

pascal
function IncMinute(const AValue: TDateTime; 
 const ANumberOfMinutes: Int64): TDateTime

Arguments

AValue

TDateTime to which minutes should be added.

ANumberOfMinutes

Number of minutes to add.

Function result

TDateTime representing AValue plus ANumberOfMinutes minutes.

Description

IncMinute adds ANumberOfMinutes minutes to AValue and returns the resulting date/time. ANumberOfMinutes can be positive or negative.

See also

Example: ex76

pascal
Program Example76;

{ This program demonstrates the IncMinute function }

Uses SysUtils,DateUtils;

Begin
  Writeln('One Minute from now is ',TimeToStr(IncMinute(Time,1)));
  Writeln('One Minute ago from now is ',TimeToStr(IncMinute(Time,-1)));
End.

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