Wrapping Up
In this article, I introduced you to some of the powerful date-related built-in functions provided with Microsoft SQL Server 2000. I showed you how the settings of the @@DATEFIRST and @@LANGUAGE global variables affect the values returned by these functions.
One of the welcome additions to SQL Server programmer's arsenal is the support of user-defined functions. If you need a function not provided with SQL Server, you can create your own user-defined function.
I also showed you how to build a user-defined function that determines whether a particular date falls on a business day. To make this function bulletproof, I enhanced it to support all regional settings.