Tag Archives: date

Finding Date Closest to Middle or Last Day of Month in SQL

If you have ever worked in SQL or other databases you know that dates can be very tricky. It is not always simple to capture differences and length of time …

Tags: , , , , , , , , , , , , , , | Posted under Programming/Coding | 1 Comment

Populate SQL Table with All Valid Dates Between Two Periods

I am working on a request from a client that required the use of a date table, but not just any date table. This table had some additional requirements; 1. …

Tags: , , , , , , , , , , , , , | Posted under Programming/Coding | Leave a comment

Using PIVOT on Dates in One Column

Suppose you have a table that contains Job ID, when it was started, and when the Job ended. Now you want the difference in days between when it was started …

Tags: , , , , , , , , , , , , , , , | Posted under Programming/Coding | Leave a comment