IncFormatDate Function

Action

Adds a certain number of days to a date and converts it into the specified format.

Include file

Kernel.bdh

Syntax

IncFormatDate( in nDate      :number,
                                  in nDays      :number,
                                  in sFormat    : string,
                                  in bLocalized : boolean optional ): string;

Return value

formatted date string

Parameter Description
nDate Input date with format YYYYMMDD
nDays Number of added days
sFormat Format control string (see FormatDate).
bLocalized If True, returns the localized date format.

Example

dcltrans
  transaction TFormatDate
  var
    sNewDate: string;
  begin
    sNewDate := IncFormatDate(19961015, 45,
DATE_YYYY_MM_DD);
    write("newdate = "); write(sNewDate);
writeln;
  end TFormatDate;

Output

newdate = 1996-11-29