Multiple choice technology databases

What does trunc(datetime) do?

  1. removes the time component from a date_time value

  2. removes the date component from a date_time value

  3. removes the day component from a date_time value

  4. removes the year component from a date_time value

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The trunc(datetime) function in Oracle/SQL truncates the time portion of a date-time value, resetting it to midnight (00:00:00) and returning only the date component. It does not remove date, day, or year values.