On this Page

    loc.formatDate

    Format a date

    Syntax

    loc.formatDate(num[, style])

    Parameters

    num is a numeric representation of the date. Typically this is from a previous call to loc.parseDate.

    style is the style of this date string. Possible styles are:

    ShortDefault style. The most terse form, as in "3/2/09"
    Medium"Mar 2, 2009"
    Long"March 2, 2009"
    Full"Friday, March 2, 2009"

    See different local patterns here. For instance "Date.3" pattern means "Short" style.

    Returned Value

    A formatted date string.

    Description

    Convert a date value "num" into a formatted date string. style indicates the display format. The value of num can be generated by the loc.parseDate function. The style variants may not all be unique for some locales.

    See Also

    _locale (Format Currency, Number, Date/Time)
    loc.parseDate