chevron_left
Date and Time
Method ADDDATEMethod ADDTIMEMethod CONVERT_TZMethod CURDATEMethod CURRENT_DATEMethod CURRENT_TIMEMethod CURRENT_TIMESTAMPMethod CURTIMEMethod DATEMethod DATE_ADDMethod DATE_FORMATMethod DATE_SUBMethod DATEDIFFMethod DAYMethod DAYNAMEMethod DAYOFMONTHMethod DAYOFWEEKMethod DAYOFYEARMethod EXTRACTMethod FROM_DAYSMethod FROM_UNIXTIMEMethod GET_FORMATMethod HOURMethod LAST_DAYMethod LOCALTIMEMethod LOCALTIMESTAMPMethod MAKEDATEMethod MAKETIMEMethod MICROSECONDMethod MINUTEMethod MONTHMethod MONTHNAMEMethod NOWMethod PERIOD_ADDMethod PERIOD_DIFFMethod QUARTERMethod SEC_TO_TIMEMethod SECONDMethod STR_TO_DATEMethod SUBDATEMethod SUBTIMEMethod SYSDATEMethod TIMEMethod TIME_FORMATMethod TIME_TO_SECMethod TIMEDIFFMethod TIMESTAMPMethod TIMESTAMPADDMethod TIMESTAMPDIFFMethod TO_DAYSMethod TO_SECONDSMethod UNIX_TIMESTAMPMethod UTC_DATEMethod UTC_TIMEMethod UTC_TIMESTAMPMethod WEEKMethod WEEKDAYMethod WEEKOFYEARMethod YEARMethod YEARWEEK
0
0
0
new
MySQL | CURDATE method
Database
chevron_rightMySQL
chevron_rightDocumentation
chevron_rightFunctions
chevron_rightDate and Time
schedule Mar 10, 2022
Last updated MySQL
Tags tocTable of Contents
expand_more MySQL's CURDATE()
method returns the current date in the session time zone.
Parameters
No parameters.
Return value
Case | Return value | Example |
---|---|---|
NOT used in numeric context |
|
|
Used in numeric context |
|
|
Examples
String context
To return the current date in session time zone:
SELECT CURDATE();
+------------+| CURDATE() |+------------+| 2020-04-16 |+------------+
Numeric context
To return the current date in session time zone as a number:
SELECT CURDATE() + 0;
+---------------+| CURDATE() + 0 |+---------------+| 20200416 |+---------------+
Published by Arthur Yanagisawa
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
Official MySQL Documentation
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_curdate