IncSecond
Increase a TDateTime 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;
Description
IncSecond adds ANumberOfSeconds seconds to AValue and returns the resulting date/time.ANumberOfSeconds 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 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.