Supported locale modifiers for SET_LOCALE

The SET_LOCALE function takes a given datetime input and returns that datetime formatted to match a particular locale. This function is written in the form SET_LOCALE(datetime, 'locale modifier'), in which the locale modifier can be something like 'en-nz' (New Zealand English), 'tzm' (Amazigh/Berber), or 'zh-tw' (Traditional Chinese).

Locale modifiers can change a number of different aspects of a datetime, including:

Numerical digits: for certain locales not using West Arabic numerical digits, numerical digits will be converted, e.g. for 'ar' (Arabic), 1 => ٢.

Script directionality: for locales using scripts that are written right-to-left, e.g. 'he' (Hebrew), the datetime will change direction accordingly.

Long date format: Long datetimes will be formatted according to the preferred format of the locale, e.g. for 'en-gb' (British English), 'MMMM D, YYYY h:mm A' => 'D MMMM YYYY HH:mm'.

The following is a table of the supported locale modifiers. The examples here use the DATETIME_FORMAT function to better show what each locale modifier does; please see this support article for an explanation of the DATETIME_FORMAT function and this support article for an explanation of the format specifiers used in the DATETIME_FORMAT function.