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

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.

Download XLTools for Excel
Syntax
=XL.FormatDate(format, date, locale)
Argument | Description |
---|---|
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.
Download examples with this function (xlsx)
Formula | Description |
---|---|
=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?