SELECT DATEADD(dd,-(DAY(GETDATE())-1),GETDATE()) AS [Primeiro dia do mês]
SELECT
DATEADD(dd,-(DAY(GETDATE())-1),GETDATE()) AS [Primeiro dia do mês]
Fonte: http://blog.sqlauthority.com/2007/05/13/sql-server-query-to-find-first-and-last-day-of-current-month/
Abs!
Muito bom
Leave your comment here!
Muito bom
ResponderExcluir