NewDateFormatter
NewDateFormatter defines a date formatter. It returns an index for use in the ParseDate and FormatDate functions. The indices start at 0 and go up by one for each call to NewDateFormat. Date formatters are valid during execution of the process.
This function is valid in TM1® TurboIntegrator processes only.
Syntax
NewDateFormatter(Locale, <TimeZone>, <UseUNIXTime>, <FormatterStyle>, <FormatterType>, <TimeType>)
Argument |
Description |
---|---|
Locale |
Locale used for parsing or formatting dates. If an empty string is passed, then the operating system locale is used. Locales are specified in
the format language[_territory][.variant]. For example, |
TimeZone |
Timezone used for parsing or formatting dates. Refer to http://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a complete list of time zones. If not specified, the time zone used is |
UseUNIXTime |
If Note that only dates later than January 1, 1970 can be processed even if TM1 serial format is used. |
FormatterStyle |
Controls the date format used when an empty pattern is specified to the FormatDate or ParseDate functions. Valid values are The default is |
FormatterType |
Controls the type of format used when an empty pattern is specified to the FormatDate or ParseDate functions. Valid values are The default is |
Example
dfUNIX = NewDateFormatter('', 'Etc/UTC', 'unix');
dfStyleFullDateTime = NewDateFormatter('en_us', 'America/Toronto', 'serial', 'full', 'datetime');