Tag: date

Dates In SQL Server

Dates In SQL Server

Some time ago what started as one article on dates and their value, turned into a mini-series (nearly as engaging as The Queens Gambit). I kept finding more to say about dates and examples to give. I’m now pulling them together with a little narrative.

Dates In Hive

Dates In Hive

After previously spending a lot of time looking at dates in SQL Server and oracle, I wanted to do the same justice to Hive.

Dates In Oracle: Ranges, Manipulation & Loops

Dates In Oracle: Ranges, Manipulation & Loops

Having spent a lot of time looking at dates in SQL Server, I thought I’d take some time to publish some notes on dates in Oracle. Most of the ideas are the same, but there are some subtleties. After my SQL Server articles: Dates In SQL Server: Managing & Manipulating Dates Dates In SQL Server:…

Read More Read More

Dates In SQL Server: Public Holidays

Dates In SQL Server: Public Holidays

For most business reporting, public holidays (or other special days) cary much business impact. Here are some ideas on solutions. It usually doesn’t take long with a data warehouse project before we want to enhance our calendar. Holidays aren’t built into DBMS systems by default, so we have to create our own solution. I feel…

Read More Read More

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: Ambiguous date specification

Dates In SQL Server: Ambiguous date specification

When writing a date in a script, there are a number of ways of doing it, the server uses geographic settings to imply the format. This has some hidden dangers. UK and US dates switch the day and month around. If there are changes in geographic settings and the date format isn’t explicit, there can…

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

Dates In SQL Server: Adding & subtracting

Dates In SQL Server: Adding & subtracting

Different DBMS systems have different ways of managing dates. As I’m doing a series of articles on dates, I thought I’d throw some notes down about calculating the difference between some of them. Testing dataset Picking up from my article on Dates In SQL Server: Create Sample Date Ranges I’ll use a sample from there to create…

Read More Read More