How can I get the end date of a quarter with SQL?

It will depend on the database you're using! As you can see below, there can be quite some variations in syntax between Vertica, SQL Server, MySQL, PostgreSQL   So, what's common in all these examples? In all cases, you will need: a function that gets the current date a function that extracts the year from … Continue reading How can I get the end date of a quarter with SQL?

How do I convert string to a date with SQL?

Hit a couple of error messages when trying to convert a string to a date? And that's totally not surprising! As you'll see below the text-to-date conversion functions within the different database environments seldom have identical syntax Why would you want to convert a string to a date? Well, it could be pretty useful if … Continue reading How do I convert string to a date with SQL?