DTOU( ) function

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


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


DTOU(<date> <,locale> <,style>)



Optional. Datetime. The field, expression, or literal value to convert to a Unicode string. If this parameter is omitted, the current operating system date is used.

The date parameter 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 output 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.

You cannot specify a locale if you have not specified a date.


Optional. Numeric constant. The date style of the output 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.

You cannot specify a style if you have not specified a date and a locale.




The DTOU( ) function cannot process dates earlier than 31 December 1969.

A field specified for the date parameter can use any date format, as long as the field definition correctly defines the format.

When specifying a literal date value for the date parameter, you are restricted to the formats YYYYMMDD and YYMMDD, and you must enclose the value in backquotes – for example, `20141231`.

DTOU( ) is the inverse of the UTOD( ) function, which converts a Unicode string to a date.

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


Example Return value

DTOU(`20141231`, "zh", 0)

星期三, 2014 十二月 31

DTOU(`20141231`, "zh", 1)

2014 十二月 31

DTOU(`20141231`, "zh_CN", 0)


DTOU(`20141231`, "zh_CN", 1)


DTOU(`20141231`, "pt_BR", 1)

31 de dezembro de 2014

DTOU(`20141231`, "pl", 1)

31 grudnia 2014

DTOU(Invoice_date, "zh", 1)

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

Related reference
UTOD( ) function

(C) 2015 ACL Services Ltd. All Rights Reserved.