weeks_add
Returns the value with the number of weeks added to date.
Syntaxβ
DATETIME weeks_add(DATETIME expr1, INT expr2);
Parametersβ
-
expr1
: the original date. It must be of theDATETIME
type. -
expr2
: the number of weeks. It must be of theINT
type.
Return valueβ
returns DATETIME
.
NULL
is returned if the date does not exist.
Examplesβ
select weeks_add('2022-12-20',2);
+----------------------------+
| weeks_add('2022-12-20', 2) |
+----------------------------+
| 2023-01-03 00:00:00 |
+----------------------------+