Bug #100054 curdate not working properly
Submitted: 1 Jul 2020 5:26 Modified: 1 Jul 2020 7:36
Reporter: Alekhya K Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[1 Jul 2020 5:26] Alekhya K
Description:
Am trying to get the yesterday date using curdate() function.

Eg: Current date is '2020-07-01'

My expected date is '2020-06-30'

select curdate();
+------------+
| curdate()  |
+------------+
| 2020-07-01 |
+------------+
1 row in set (0.00 sec)

select curdate()-1;
+-------------+
| curdate()-1 |                     --- Expecting 2020-06-30 here
+-------------+
|    20200700 |
+-------------+
1 row in set (0.01 sec)

How to repeat:
Can you please let me know is it a bug or am querying wrongly.
[1 Jul 2020 7:36] MySQL Verification Team
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

For details on getting support for MySQL products see http://www.mysql.com/support/
You can also check our forums (free) at http://forums.mysql.com/

Thank you for your interest in MySQL.

Also, please see Bug #47140.

Please see https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-add