Skip to main contentSkip to solution

What will be the format of the output of the NOW() function?

Solution

✅ Correct Option: 2

NOW() in SQL (MySQL) returns the current date and time together, in the format YYYY-MM-DD HH:MM:SS, for example 2024-05-17 14:30:45.


Option 1: this is the format of CURTIME(), which returns only the time.

Options 3 and 4: the date always comes first, and it is written year-month-day, never year-day-month.

CURDATE() returns only the date, as YYYY-MM-DD.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question