JDatabaseQuery::dateAdd
Add to the current date and time.
Usage: $query->select($query->dateAdd()); Prefixing the interval with a - (negative sign) will cause subtraction to be used. Note: Not all drivers support all units.
Signature
public function dateAdd(datetime
$date,
string
$interval,
string
$datePart )
Parameters
-
$date
- The date to add to. May be date or datetime
-
$interval
- The string representation of the appropriate number of units
-
$datePart
- The part of the date to perform the addition on
Returns
- string
- The string with the appropriate sql for addition of dates