Question:medium

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

Show Hint

Use \texttt{CURDATE()} for only the date, and \texttt{CURTIME()} for only the time in SQL.
Updated On: Feb 15, 2026
  • HH:MM:SS
  • YYYY-MM-DDHH:MM:SS
  • HH:MM:SS YYYY-MM-DD
  • YYYY-DD-MMHH:MM:SS
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Understanding NOW() function.
In SQL, the \texttt{NOW()} function retrieves the current system date and time.
Step 2: Output format.
The function outputs the date and time in a standard timestamp format: \[\text{YYYY-MM-DD HH:MM:SS}\]
Step 3: Verify against options.
- Option 1: HH:MM:SS → time only; incomplete.
- Option 2: YYYY-MM-DD HH:MM:SS → correct, full format.
- Option 3: HH:MM:SS YYYY-MM-DD → incorrect order.
- Option 4: YYYY-DD-MM HH:MM:SS → incorrect date format.

Final Answer: \[\boxed{\text{NOW() returns date and time in YYYY-MM-DD HH:MM:SS format.}}\]
Was this answer helpful?
0