What will be the format of the output of the NOW() function?
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.
Related questions:
2026: 29 May Shift 2
2025: 15 May Shift 2
2025: 13 May Shift 2
2025: 14 May Shift 1
2025: 21 May Shift 1