Date transform into a standard format
It seems like the last couple of months I’ve been doing nothing but data cleaning and transformations. As a result, I’ve been having to create all kinds of strange temporary functions to manipulate data to extract the required information. Particularly, date transformations.
Of course, different installations of SQL Server (not to mention different database systems) handle dates in different ways - so it’s been important to handle them consistently. This little bit of T-SQL has been very useful in that regard…