- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between MySQL NOW() and CURDATE() function?
As the name suggests CURDATE() function will return the current date. In simple words, we can say that it would return only the date not time.
mysql> select CURDATE(); +------------+ | CURDATE() | +------------+ | 2017-10-28 | +------------+ 1 row in set (0.00 sec)
In contrast, NOW() function will return current date and time.
mysql> Select NOW(); +---------------------+ | NOW() | +---------------------+ | 2017-10-28 09:10:16 | +---------------------+ 1 row in set (0.00 sec)
Advertisements