CodeProject Assume you've been asked to return a date stored as a datetime2 in a specific format using Transact-SQL. For SQL Server 2012+, one option is to use T-SQL's FORMAT() function. FORMAT() is used with either a .NET format string or a custom formatting string to determine the formatting that should be applied. Starting with … Continue reading Formatting Dates in T-SQL Using CONVERT with Style Codes