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

IncMilliSecond

Increase a DateTime value with a number of milliseconds.

Declaration

Source position: line 0

function IncMilliSecond(

  const AValue: TDateTime;

  const ANumberOfMilliSeconds: Int64

):TDateTime;

function IncMilliSecond(

  const AValue: TDateTime

):TDateTime;

Arguments

AValue

  

DateTime to which milliseconds should be added.

ANumberOfMilliSeconds

  

Number of milliseconds to add

Function result

DateTime representing AValueplus ANumberOfMilliSecondsmilliseconds.

Arguments

AValue

  

DateTime to which milliseconds should be added.

Function result

DateTime representing AValueplus ANumberOfMilliSecondsmilliseconds.

Description

IncMilliSecondadds ANumberOfMilliSecondsmilliseconds to AValueand returns the resulting date/time.ANumberOfMilliSecondscan 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 Example78;

{ This program demonstrates the IncMilliSecond function }

Uses SysUtils,DateUtils;

Begin
  Writeln('One MilliSecond from now is ',TimeToStr(IncMilliSecond(Now,1)));
  Writeln('One MilliSecond ago from now is ',TimeToStr(IncMilliSecond(Now,-1)));
End.