What is the difference between NOW() and CURRENT_DATE()?

NOW() command is used to show current year, month, date with hours, minutes, and seconds while CURRENT_DATE() shows the current year with month and date only.

In MySQL, NOW() and CURRENT_DATE() are both functions used to retrieve the current date and time, but they return slightly different values:

  1. NOW(): This function returns the current date and time, including the time portion. It returns the date and time in the format ‘YYYY-MM-DD HH:MM:SS’.
  2. CURRENT_DATE(): This function returns only the current date without the time portion. It returns the date in the format ‘YYYY-MM-DD’.

So, the main difference is that NOW() includes both the date and time, while CURRENT_DATE() only returns the date.