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

IncSecond

Increase a DateTime value with a number of seconds.

Declaration

Source position: dateutil.inc line 295

function IncSecond(

  const AValue: TDateTime;

  const ANumberOfSeconds: Int64

):TDateTime;

function IncSecond(

  const AValue: TDateTime

):TDateTime;

Arguments

AValue

  

DateTime to which seconds should be added.

ANumberOfSeconds

  

Number of seconds to add

Function result

DateTime representing AValue plus ANumberOfSeconds seconds.

Arguments

AValue

  

DateTime to which seconds should be added.

Description

IncSecond adds ANumberOfSeconds seconds to AValue and returns the resulting date/time.ANumberOfSeconds can be positive or negative.

See also

IncYear

  

Increase a DateTime value with a number of years.

#rtl.sysutils.IncMonth

  

Increases the month in a TDateTime value 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 Example77;

{ This program demonstrates the IncSecond function }

Uses SysUtils,DateUtils;

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

Documentation generated on: Nov 14 2015