UTOD( ) function

Converts a Unicode string to a date, which allows dates in various languages to be displayed in a numeric format. Abbreviation for “Unicode to Date”.


This function is specific to the Unicode edition of ACL. It is not a supported function in the non-Unicode edition.


UTOD(string <,locale> <,style>)



Character. The Unicode string to convert to a date.

The Unicode string can contain a datetime value, but the time portion of the value is ignored. Standalone time values are not supported.


Optional. Character. The locale code to use. Specifies the language of the input Unicode string, and optionally the version of the language associated with a particular country or territory – for example, "zh" specifies Chinese, and "pt_BR" specifies Brazilian Portuguese. If no country is specified, the default country for the language is used. The locale parameter must be enclosed in quotation marks. If you omit the parameter, the default locale for your computer is used.


Optional. Numeric constant. The date style matching the input Unicode string. Specify 0 for full, 1 for long, 2 for medium, or 3 for short. If you omit the parameter, the default value of 2 is used.


Datetime. The date value is output using the current ACL date display format.


To successfully convert Unicode strings containing dates into ACL dates you must specify locale and style parameters that match the language, country/territory (if applicable), and style of the date in the Unicode string. In the examples below, the locale code for Chinese (“zh”) and Simplified Chinese (“zh_CN”) match different input strings and are not interchangeable. You must also specify the correct style. A long Unicode date string (that is, style is 1) does not return an ACL date if you specify a style of 2.

UTOD( ) is the inverse of the DTOU( ) function, which converts a date to a Unicode string. If you are uncertain which country/territory and style to specify for the UTOD( ) function, you can use DTOU( ) and experiment with different parameters to produce an output Unicode string that matches the form of the input Unicode strings you want to convert with UTOD( ).

For more information about locale codes, see www.unicode.org.


Example Return value

UTOD("星期三, 2014 十二月 31", "zh", 0)

31 Dec 2014

Assumes a current ACL date display format of DD MMM YYYY (for this return value, and all those below)

UTOD("2014 十二月 31", "zh", 1)

31 Dec 2014

UTOD("20141231日星期三", "zh_CN", 0)

31 Dec 2014

UTOD("20141231", "zh_CN", 1)

31 Dec 2014

UTOD("31 de dezembro de 2014", "pt_BR", 1)

31 Dec 2014

UTOD("31 grudnia 2014", "pl", 1)

31 Dec 2014

UTOD(Invoice_date, "zh", 1)

The numeric date equivalent for each Unicode string in the Invoice_date field

Related reference
DTOU( ) function

(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback