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

This article demonstrates how to explicitly format a date in Great Britain English format when using the T-SQL FORMAT() function in SQL Server.

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 Great Britain English date format.

Example 1 – Short British Date Format

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

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

Result:

+------------+
| Result     |
|------------|
| 01/12/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 Great Britain English format, the day comes before the month (this is in contrast to the US date format, where the month comes before the day).

Example 2 – Long British Date Format

You can change the second argument to an uppercase D to result in a longer date format, with the month spelled out:

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

Result:

+------------------+
| Result           |
|------------------|
| 01 December 2020 |
+------------------+

Example 3 – Custom British Date Format

You can also use a custom date format if required. This allows you to explicitly state exactly how and where each date component goes.

Example:

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

Result:

+------------------+
| Result           |
|------------------|
| Tue, 1 Dec, 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.

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).