How do you list the name of the months between date ranges? A friend and former co-worker sent me this script using DATENAME and DATEADD.
SQL SERVER – Finding if Current Week is Odd or Even – Script
A bank DBA needed a script to tell if the current week is odd or even, to keep more cash on the 2nd and 4th weeks. Here is the script I use.
SQL SERVER – Convert Seconds to Hour : Minute : Seconds Format
A reader needed to convert seconds to Hour : Minute : Seconds format for a web page report. Here is a simple T-SQL script that does it.
SQL SERVER – Validating If Date is Last Day of the Year, Month or Day
A reader asked how to check if a date is the last day of the year, month or week. There is no built-in function, so here is the one I wrote.
SQL SERVER – Script to Find First Day of Current Month
Michael Usov suggested a quick way to find the first day of current month while keeping the DATETIME datatype, with or without the time part.
MySQL – How to Format Date in MySQL with DATE_FORMAT()
MySQL uses the DATE_FORMAT function to show a date or datetime value in the format you need. Here are simple, self-explanatory examples for common formats.
MySQL – Finding First day and Last day of a Month
MySQL has LAST_DAY to find the last day of a month but nothing built in for the first day. I show two simple methods to find the first day as well.





