DateFormatFromLocaleConstants

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(). Value is ignored when date format is not 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.FROM_LOCALE, 
                          TimeFormatConstants.TWELVE_HOUR, 
                          DateFormatFromLocaleConstants.SHORT );
Ext.WriteStream( s );

Result:

2/2/18 6:22:06 PM

Related Topics

Constants

TimeMillis

TimeT