Skip to content

IncMilliSecond

Increase a TDateTime value with a number of milliseconds.

Declaration

Source position: dateutil.inc line 297

  function IncMilliSecond(const AValue: TDateTime; 
                         const ANumberOfMilliSeconds: Int64) : TDateTime;
  function IncMilliSecond(const AValue: TDateTime) : TDateTime;

Description

IncMilliSecond adds ANumberOfMilliSeconds milliseconds to AValue and returns the resulting date/time.ANumberOfMilliSeconds can be positive or negative.

See also

Name Description
IncDay Increase a TDateTime value with a number of days.
IncHour Increase a TDateTime value with a number of hours.
IncMilliSecond Increase a TDateTime value with a number of milliseconds.
IncSecond Increase a TDateTime value with a number of seconds.
IncWeek Increase a TDateTime value with a number of weeks.
IncYear Increase a TDateTime value with a number of years.
#rtl.sysutils.IncMonth Increases the month in a TDateTime value with a given amount.

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.