Victoria Yudin has a great look at Coding specific dates in SQL Server. If you’ve ever struggled with dates in SQL server this is fantastic reference. Do you need the second Thursday of the the current month? Yeah, she shows you how to do that. It’s very complete.
Coding specific dates in SQL Server
SQL & DataInstall, Upgrade & Admin
Archived post from 2010. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.