[Overview][Constants][Procedures and functions] Reference for unit 'dateutils' (#rtl)

IncMinute

Increase a DateTime value with a number of minutes.

Declaration

Source position: line 0

function IncMinute(

  const AValue: TDateTime;

  const ANumberOfMinutes: Int64

):TDateTime;

function IncMinute(

  const AValue: TDateTime

):TDateTime;

Arguments

AValue

  

DateTime to which minutes should be added.

ANumberOfMinutes

  

Number of minutes to add

Function result

DateTime representing AValueplus ANumberOfMinutesminutes.

Arguments

AValue

  

DateTime to which minutes should be added.

Function result

DateTime representing AValueplus ANumberOfMinutesminutes.

Description

IncMinuteadds ANumberOfMinutesminutes to AValueand returns the resulting date/time.ANumberOfMinutescan be positive or negative.

See also

IncYear

  

Increase a DateTime value with a number of years.

#rtl.sysutils.IncMonth

  

Increases the month in a TDateTimevalue with a given amount.

IncWeek

  

Increase a DateTime value with a number of weeks.

IncDay

  

Increase a DateTime value with a number of days.

IncHour

  

Increase a DateTime value with a number of hours.

IncSecond

  

Increase a DateTime value with a number of seconds.

IncMilliSecond

  

Increase a DateTime value with a number of milliseconds.

Example

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.