<link href="https://fonts.googleapis.com/css?family=Roboto:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&amp;display=swap" rel="stylesheet"/>
5 minutes reading time (1044 words)

Set language and date format in Office 365 Online using PowerShell

How to set language and date format (e.g. English UK or English US) in Office 365 for Excel Online and Outlook Online using PowerShell

Excel Online shows a different date format from Excel Desktop App

In this example, a spreadsheet created in Excel desktop app with dates in English UK format (dd/mm/yy) incorrectly displays dates in English US format when uploaded to Teams and opened with Excel Online.

UK Date Format

When the spreadsheet is uploaded to Teams and opened in Excel online, the dates display in English US format mm/dd/yy.

English US date format

To fix this problem, we will use PowerShell to set the Office 365 language and date format for the user.

Change Office 365 language and date format using PowerShell

Language and region settings in Office 365 can be set using PowerShell Set-MsolUser PreferredLanguage.

Set-MsolUser PreferredLanguage uses a language ID to set the regional language and date format.

Example: Set preferred language to en-CA English (Canada)

Get-MsolUser -UserPrincipalName bender@planetexpress.live | Set-MsolUser -PreferredLanguage "en-CA"

Office 365 language ID list

Here is a quick list of commonly used Office 365 language IDs. For a complete list, see the reference link at the end of this article.

Country Language Language ID
Australia          English (Australia)  en-AU           
BelgiumDutch (Belgium)nl-BE
BelgiumFrench (Belgium)fr-BE
CanadaEnglish (Canada)en-CA
DenmarkDanish (Denmark)da-DK
FranceFrench (France)fr-FR
GermanyGerman (Germany)de-DE
Italy Italian (Italy) it-IT
Netherlands Dutch (Netherlands)nl-NL
New ZealandEnglish (New Zealand)en-NZ
Spain Spanish (Spain)es-ES
United KingdomEnglish (United Kingdom)en-GB
United StatesEnglish (United States)en-US

Get Office 365 language using PowerShell Get-MsolUser PreferredLanguage

# Connect to Azure Active Directory
Connect-MsolService

# Get-MsolUser PreferredLanguage
Get-MsolUser -UserPrincipalName bender@planetexpress.live | Select UserPrincipalName, PreferredLanguage 
# Get-MsolUser all properties 
Get-MsolUser -UserPrincipalName bender@planetexpress.live | fl 

Set Office 365 language using PowerShell Set-MsolUser PreferredLanguage

# Set preferred language to English UK
Get-MsolUser -UserPrincipalName bender@planetexpress.live | Set-MsolUser -PreferredLanguage "en-GB"

# Set preferred language to English US
Get-MsolUser -UserPrincipalName bender@planetexpress.live | Set-MsolUser -PreferredLanguage "en-US" 

Office 365 Usage Location

The usage location determines which Office 365 licenses and features are available based on the country.

Find the geo location of a mailbox

# Connect to Exchange online
# Get mailbox region
Get-Mailbox -Identity bender@planetexpress.live | Format-List Database,MailboxRegion* 

 Mailbox database is in the United Kingdom (GB)

Change Office 365 usage location using PowerShell Set-MsolUser -UsageLocation

# Get current usage location
Get-MsolUser -UserPrincipalName bender@planetexpress.live | Select UserPrincipalName, PreferredLanguage, UsageLocation

# Change usage location to United States US
Set-MsolUser -UserPrincipalName bender@planetexpress.live -UsageLocation US
 

Set Exchange Online language and date format using PowerShell Set-MailboxRegionalConfiguration

You can use Set-MailboxRegionalConfiguration to change the language, date format, time format, and time zone for Exchange online.

Get Exchange online mailbox regional settings

# Connect to Exchange Online PowerShell
# Get mailbox current regional configuration settings 
Get-Mailbox bender@planetexpress.live | Get-MailboxRegionalConfiguration  

Time formats

The default time format for English UK is HH:mm which is 24-hour clock format. To use AM/PM instead, change the time format to h:mm tt

HH 24-hour format
hh 12-hour format
mmMinutes
ssSeconds
ttAM/PM

Change mailbox regional configuration

# Change mailbox regional configuration to English UK
Get-Mailbox bender@planetexpress.live | Get-MailboxRegionalConfiguration  | Set-MailboxRegionalConfiguration -Language en-GB -DateFormat "dd/MM/yyyy" -TimeFormat "HH:mm" 

# Change mailbox regional configuration to English US
Get-Mailbox bender@planetexpress.live | Get-MailboxRegionalConfiguration  | Set-MailboxRegionalConfiguration -Language en-US -DateFormat "MM/dd/yyyy" -TimeFormat "HH:mm" 

# Change mailbox regional configuration to Spanish (Spain), Time zone Central European Time (CET) 
Get-Mailbox bender@planetexpress.live | Get-MailboxRegionalConfiguration  | Set-MailboxRegionalConfiguration -Language es-ES -DateFormat "MM/dd/yyyy" -TimeFormat "HH:mm" -TimeZone "C. Europe Standard Time"
 

Change language and date format in Excel Online

People can change the Regional format settings themselves in Office 365 Online.

Open Excel online
File - options - Regional Format Settings

Select your preferred regional format for Excel

Change language and date format in Outlook for the web

Outlook Online
Settings - View All Outlook Settings

General - Language and time

References:

How to set language and region settings for Office 365
https://docs.microsoft.com/en-US/office365/troubleshoot/access-management/set-language-and-region

Language, Location, and Language tags
Windows Language Code Identifier (LCID) Reference
5 Appendix A: Product Behavior
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c

For lists of country and region names that are supported by various Windows operating system versions, see the Language, Location, and Language tag columns of the table in Appendix A: Product Behavior in [MS-LCID]: Windows Language Code Identifier (LCID) Reference.

Administering Exchange Online mailboxes in a multi-geo environment
https://docs.microsoft.com/en-us/microsoft-365/enterprise/administering-exchange-online-multi-geo

Related Posts

 

Comments 2

Guest - gary on Tuesday, 17 October 2023 13:36

Nice. So for ADConnect tenants (AD to AAD), can we set this on the AD side If so is there a command?

Nice. So for ADConnect tenants (AD to AAD), can we set this on the AD side If so is there a command?
TechLabs on Wednesday, 07 February 2024 16:36

Hi, you can do this in Active Directory using PowerShell.
Something like this might work:
Set-ADUser -Identity USERNAME PreferredLanguage="en-US"

Hi, you can do this in Active Directory using PowerShell. Something like this might work: Set-ADUser -Identity USERNAME PreferredLanguage="en-US"
Already Registered? Login Here
Sunday, 22 February 2026
You can help support this website by buying me a coffee!
Buy Me A Coffee