First day of month
Here you will use the GETDATE(), DATEDIFF(), and DATEADD() functions to find the first day of the current month.
Este exercicio faz parte do curso
Writing Functions and Stored Procedures in SQL Server
Instruções do exercicio
- Find the current date value.
- Calculate the difference in months between today and
0(1/1/1900in SQL). - Add 0 months to that difference to get the first day of the month.
exercicio interativo prático
Tente este exercicio completando este código de exemplo.
-- Find the first day of the current month
SELECT ___(___, ___(___, 0, GETDATE()), ___)