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

IncHour

Increase a DateTime value with a number of hours.

Declaration

Source position: dateutil.inc line 291

function IncHour(

  const AValue: TDateTime;

  const ANumberOfHours: Int64

):TDateTime;

function IncHour(

  const AValue: TDateTime

):TDateTime;

Arguments

AValue

  

DateTime to which hours should be added.

ANumberOfHours

  

Number of hours to add

Function result

DateTime representing AValue plus ANumberOfHours hours.

Arguments

AValue

  

DateTime to which hours should be added.

Description

IncHour adds ANumberOfHours hours to AValue and returns the resulting date/time.ANumberOfHours 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.

IncMinute

  

Increase a DateTime value with a number of minutes.

IncSecond

  

Increase a DateTime value with a number of seconds.

IncMilliSecond

  

Increase a DateTime value with a number of milliseconds.

Example

Program Example75
;

{ This program demonstrates the IncHour function }

Uses SysUtils,DateUtils;

Begin
  Writeln('One Hour from now is ',DateTimeToStr(IncHour(Now,1)));
  Writeln('One Hour ago from now is ',DateTimeToStr(IncHour(Now,-1)));
End.

Documentation generated on: Nov 14 2015