Question:

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: Sep 18, 2025
  • HH:MM:SS
  • YYYY-MM-DDHH:MM:SS
  • HH:MM:SS YYYY-MM-DD
  • YYYY-DD-MMHH:MM:SS
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understanding NOW() function.
In SQL, the \texttt{NOW()} function returns the current date and time of the system where the query is executed.
Step 2: Output format.
The result is returned in a standard timestamp format: \[ \text{YYYY-MM-DD HH:MM:SS} \]
Step 3: Verify against options.
- Option 1: HH:MM:SS → only time, 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
0

Questions Asked in CUET exam

View More Questions