YESTERDAY
Returns yesterday date, same as today() - 1
.
Analyze Syntax
func.yesterday()
Analyze Examples
func.yesterday()
+------------------+
| func.yesterday() |
+------------------+
| 2021-09-02 |
+------------------+
SQL Syntax
YESTERDAY()
Return Type
DATE
, returns date in “YYYY-MM-DD” format.
SQL Examples
SELECT YESTERDAY();
+-------------+
| YESTERDAY() |
+-------------+
| 2021-09-02 |
+-------------+
SELECT TODAY()-1;
+---------------+
| (TODAY() - 1) |
+---------------+
| 2021-09-02 |
+---------------+
Last modified June 12, 2024 at 9:53 PM EST: updating datetime functions (f087f54)