format-date

Returns the date for a given date and locale.

Syntax

    format-date(strDate, "language", "country", "variant", "timezone")

Parameters

strDate is a string that represents the date in the format yyyy-mm-dd.

You can also specify zero or one set of parameters that identifies the locale of the equivalent date:

  • language is a string that identifies the language of the locale.

  • country is a string that identifies the country of the locale.

  • variant identifies a vendor or web browser.

  • timezone identifies the time zone of the locale.

    For more information about date and time parameters, see Date and time parameters .

Returns

A string that represents the equivalent date in the format yyyy-mm-dd .

Example

The following expression returns the current date for the Pacific time zone in the United States, in a format that is appropriate for the Windows operating system:

format-date(currentdate(),"en", "US", "WIN", "US/Pacific-New")