Tag: windowing

Dates In SQL Server: The last X of the month

Dates In SQL Server: The last X of the month

Finding the last X day of the month isn’t as easy as you might think. I learned this when people wanted to build a calendar for planning and automation. This is a neat addition to the article:┬áDates In SQL Server: Weekdays & Weekends Create sample date data From my previous article, the below SQL will…

Read More Read More

Dates In SQL Server: Weekdays & Weekends

Dates In SQL Server: Weekdays & Weekends

For reporting or for process management, it’s handy to be able to quickly identify weekdays and weekends. Here I’ll look at a few methods for calculating weekdays and weekends. Some of these come easily from SQL Server, others require a bit more manipulation. Most of this builds on my previous articles on dates: Dates In…

Read More Read More