AddDays method

Official Content
This documentation is valid for:

Adds a given number of days to a given date.


Date DateTime.AddDays(Numeric-expression)


Date DateTime
   Is a Date or DateTime expression, to which the method will add a certain number of days.

    Is a Numeric expression that indicates the number of days to be added to the Date | DateTime. 

Type Returned:
Date | DateTime


Data Types: Date DateTime


Returns a value that results from adding a number of days to a given date or date with time.

The result data type will be the same as the given original value (Date or DateTime).

If the numeric expression is negative, the days are subtracted from the given date.


  • GeneXus verifies the resulting date in order to obtain a valid one.
  • In Microsoft SQL Server, this function takes part of the SQL sentence send to the database manager.


&Date1 = &Date1.AddDays(7) // Adds one week to Date1 variable

You can also add days to a given date just by using the '+' operator:

&Date1 = &Date1 + 7 // Adds one week to Date1 variable


This method is available since GeneXus X Evolution 2.

See Also

AddYr function
AddHours method
AddMinutes method