TimeFormatConstants

Description

Identifies the format of the text while parsing dates, or what output format to use when formatting dates with TimeT.ParseDateText(), TimeT.FormatDateText(), TimeMillis.ParseDateText(), and TimeMillis.FormatDateText(). Ignored when DateFormatConstants is used with FROM_LOCALE.

Technical Details

SBM ModScript version: 11.3.

Example

var t = TimeT(1517620926);
var s = t.FormatDateText( DateTimeAttributeConstants.DATETIME, 
                          CreateTimeZone("MST"), 
                          CreateLocale("en_US"), 
                          DateFormatConstants.MM_DD_YYYY, 
                          TimeFormatConstants.TWELVE_HOUR, 
                          DateFormatFromLocaleConstants.SHORT );
Ext.WriteStream( s );

Result:

02/02/2018 06:22:06 PM

Related Topics

Constants

TimeMillis

TimeT