VeloDB Cloud
SQL Manual
Functions
date-time-functions
weeks_add

weeks_add

Description

Syntax:

DATETIME WEEKS_ADD(DATETIME date, INT weeks)

This function adds the specified weeks to the given date.

date can be of DATE or DATETIME type, and the returned result is of the same type as date.

Example

mysql> select weeks_add("2020-02-02 02:02:02", 1);
+-------------------------------------+
| weeks_add('2020-02-02 02:02:02', 1) |
+-------------------------------------+
| 2020-02-09 02:02:02                 |
+-------------------------------------+

Keywords

WEEKS_ADD