days_add

description

Syntax

DATETIME DAYS_ADD(DATETIME date, INT days)

From date time or date plus specified days

The parameter date can be DATETIME or DATE, and the return type is consistent with that of the parameter date.

example

  1. mysql> select days_add(to_date("2020-02-02 02:02:02"), 1);
  2. +---------------------------------------------+
  3. | days_add(to_date('2020-02-02 02:02:02'), 1) |
  4. +---------------------------------------------+
  5. | 2020-02-03 |
  6. +---------------------------------------------+

keywords

  1. DAYS_ADD