XL.FormatDate function: change format of date and time values

How to use FormatDate function for Excel: formula and results
XL.FormatDate function – Text function type – applies specified format and culture-specific formatting information to a date and time value.

Before you begin, add Functions to Excel

Functions are one of the 20+ features within XLTools Add-in for Excel. Works in Excel 2019, 2016, 2013, 2010, desktop Office 365.

Get started with XLTools ribbon
– free trial gives you 14 days of full access to all features.

Syntax

=XL.FormatDate(format, date, locale)
ArgumentDescription
format
[required]
A text string representing a date and time format code (standard or custom)
date
[required]
The date and time value you want to format
locale
[required]
Two or five symbols of country code: en-US, en-GB, CN, RU, FR, etc.

Examples [download]

Download this spreadsheet with examples and try the function yourself.


FormulaDescription
=XL.FormatDate("", A2, "EN")Applies the standard date format in EN locale to the date in cell A2
=XL.FormatDate("", A2, "en-US")Applies the standard date format in en-US locale to the date in cell A2
=XL.FormatDate("dd MMMM yyyy", A2, "EN")Applies the "dd MMMM yyyy" date format in EN locale to the date in cell A2

Any questions or suggestions?
How can we help?