CBSE Class 12 Informatics Practices Question 77 of 81

MySQL Functions — Question 7

Back to all questions
7
Question

Question 7

Show via query how many days remain until Christmas. Round fractional days up using the numeric function ROUND.

Answer
SELECT ROUND(DAYOFYEAR('2024-12-25') - DAYOFYEAR(CURDATE())) AS DaysUntilChristmas;
Output
+--------------------+
| DaysUntilChristmas |
+--------------------+
|                218 |
+--------------------+