How to Display a Date in US Date Format in SQL Server (T-SQL)

In SQL Server, you can use the T-SQL FORMAT() function to display a date in the desired format. This function accepts an optional “culture” argument, which you can use to specify US date format.

You may or may not need to use this argument, depending on the language of your local session. However, here’s how to explicitly specify US date format.

Example 1 – Short US Date Format

To explicitly specify that a date should be displayed in US English format, use en-US as the culture argument:

DECLARE @thedate date = '2020-12-01'
SELECT FORMAT(@thedate, 'd', 'en-US') Result;

Result:

+-----------+
| Result    |
|-----------|
| 12/1/2020 |
+-----------+

In this case, I used a lowercase d as the second argument. This results in a relatively short date format, with the day and month being displayed as numbers.

And because we’re using a US date format, the month comes before the day.

Example 2 – Long US Date Format

If I change it to an uppercase D, I get a longer format, with the day and month spelled out:

DECLARE @thedate date = '2020-12-01'
SELECT FORMAT(@thedate, 'D', 'en-US') Result;

Result:

+---------------------------+
| Result                    |
|---------------------------|
| Tuesday, December 1, 2020 |
+---------------------------+

Example 3 – Custom US Date Format

If you find that the above date formats are too restrictive, you can always specify a custom date format. For example, if you like the previous example, except you prefer to have only the first 3 letters of the day and month, you could do this:

DECLARE @thedate date = '2020-12-01'
SELECT FORMAT(@thedate, 'ddd, MMM d, yyyy', 'en-US') Result;

Result:

+------------------+
| Result           |
|------------------|
| Tue, Dec 1, 2020 |
+------------------+

I still specify a culture even though I’m specifying exactly where each date component goes. The reason I’m doing this is to explicitly state which language to use. Omitting this argument may or may not cause issues, depending on the languages being used.

The good thing about custom date formats is that it gives you a lot of flexibility. You can switch components around and they will appear exactly where you want them.

Checking your Current Session

When using the FORMAT() function, if the culture argument is not provided, the language of the current session is used. This language is set either implicitly, or explicitly by using the SET LANGUAGE statement.

For more info, here are 3 Ways to Get the Language of the Current Session in SQL Server (T-SQL).

Also see How to Set the Current Language in SQL Server (T-SQL).