The SQL query is shown below
SELECT DATEADD(month, DATEDIFF(month, -1, getdate()) - 2, 0) as FirstDayWithTime,
DATEADD(ss, -1, DATEADD(month, DATEDIFF(month, 0, getdate()), 0)) as LastDayWithTime
The SQL query is shown below
SELECT DATEADD(month, DATEDIFF(month, -1, getdate()) - 2, 0) as FirstDayWithTime,
DATEADD(ss, -1, DATEADD(month, DATEDIFF(month, 0, getdate()), 0)) as LastDayWithTime
Join the conversation! Your thoughts help the community grow.