Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curdate() Vs current_date MySql

What is the difference between curdate() and current_date in MySQL?

like image 479
Bharanidharan Avatar asked Jan 06 '14 06:01

Bharanidharan


People also ask

What is the difference between now () and CURRENT_DATE () in MySQL?

Current_date() will only give you the date. now() give you the datetime when the statement,procedure etc... started.

What is the difference between Curdate () and date () functions?

1 Answer. CURDATE() returns the current date whereas DATE() extracts the date part or datetime expression.

What is MySQL Curdate?

MySQL CURDATE() Function The CURDATE() function returns the current date. Note: The date is returned as "YYYY-MM-DD" (string) or as YYYYMMDD (numeric). Note: This function equals the CURRENT_DATE() function.

What is Curdate and Curtime?

NOW() it produce date and time both in current scenario whereas CURDATE() produce date only, CURTIME() display time only, we can use one of them according to our need with CAST or merge other calculation it, MySQL rich in these type of function.


1 Answers

There's no difference. It says it right there in the manual:

CURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().

like image 161
Barmar Avatar answered Sep 30 '22 14:09

Barmar