FormatDate

The FormatDate function formats a date value according to a formatter defined with the NewDateFormatter function.

This is a TM1® TurboIntegrator function, valid only in TurboIntegrator processes.

Syntax

FormatDate(Date, <Pattern>, <Index>)

Arguments

Argument

Description

Date

A date value.

The type of value, serial or UNIX, should correspond to the formatter used.

Pattern

Pattern used for formatting dates.

Refer to http://userguide.icu-project.org/formatparse/datetime for a complete list of format syntax.

If an empty string is passed, then the format is determined by the locale based on the FormatterStyle and FormatterType parameters that were used with the NewDateFormatter function.

Index

Index returned by a call to the NewDateFormatter function.

The default value is 0.

If no date formatter exists at the index, then a default formatter is used as though it had been created with the following call:

NewDateFormatter('', 'Etc/UTC', 'serial', 'medium', 'date')

Example

sDate = FormatDate(18000);