Informatics Practices

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

SQL Queries

2 Likes

Answer

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

Answered By

1 Like


Related Questions