Skip to main contentSkip to solution

______ function is used to get a specified day of the month for a given date.

Solution

✅ Correct Option: 2

The DAY() function takes a date and returns the day of the month (1 to 31) as a number. For example, DAY('2024-03-15') returns 15.


Option 1: GETDATE() returns the current system date and time (SQL Server). It does not extract a part of a given date.

Option 3: DATE() extracts the date part from a date-time value in MySQL, so it returns the whole date rather than the day number.

Option 4: CURRENTDATE() is not a standard SQL function. The usual forms are CURDATE() or CURRENT_DATE.

Keyboard Shortcuts

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