SQL SERVER – Display Dates in Different cultures FORMAT

Today we are going to learn a very simple and interesting concept which is used very little in the industry. It is about how to Display Dates in Different cultures FORMAT.

Title Display Dates in Different cultures FORMAT over one date in US English, Gujarati, Spanish, Icelandic

Let us assume that you want to display your current date and time in different formats in different geographic locations with the help of SQL Server. In SQL Server we have an option for function FORMAT which can make things easy for us.

For example, if you want to convert today’s date and time to any other culture’s date and time, you can easily do that by using the following query.

DECLARE @dt DATETIME = GETDATE();
SELECT FORMAT( @dt, 'F', 'en-US' ) 'US English'
,FORMAT( @dt, 'F', 'gu') 'Gujarati India'
,FORMAT( @dt, 'F', 'es' ) 'Spanish'
,FORMAT( @dt, 'F', 'is') 'Icelandic'; 

The result of the query will be as following:

Sunday, May 30, 2021 3:36:39 PM.

 

Well, that’s it for today. You can use any other local and get your preferred results. I will be interesting to see what is your local and its result, why not paste that in the comment section below.

Here are my few recent videos and I would like to know what is your feedback about them. You can also subscribe to my YouTube Channel – SQL in Sixty Seconds.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL DateTime, SQL Scripts, SQL Server
Previous Post
EDIT_DISTANCE and JARO_WINKLER: Fuzzy String Matching in SQL Server 2025
Next Post
Unlock SQL Login Without Changing the Password

Related Posts

5 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.