help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

IncWeek

Increase a DateTime value with a number of weeks.

Declaration

Source position: line 0

function IncWeek(

  const AValue: TDateTime;

  const ANumberOfWeeks: Integer

):TDateTime;

function IncWeek(

  const AValue: TDateTime

):TDateTime;

Arguments

AValue

  

DateTime to which weeks should be added.

ANumberOfWeeks

  

Number of weeks to add

Function result

DateTime representing AValue plus ANumberOfWeeks weeks.

Arguments

AValue

  

DateTime to which weeks should be added.

Function result

DateTime representing AValue plus ANumberOfWeeks weeks.

Description

IncWeek adds ANumberOfWeeks weeks to AValue and returns the resulting date/time.ANumberOfWeeks 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.

IncDay

  

Increase a DateTime value with a number of days.

IncHour

  

Increase a DateTime value with a number of hours.

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 Example73;

{ This program demonstrates the IncWeek function }

Uses SysUtils,DateUtils;

Begin
  Writeln('One Week from today is ',DateToStr(IncWeek(Today,1)));
  Writeln('One Week ago from today is ',DateToStr(IncWeek(Today,-1)));
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505