# DateTimeFormatter Object The DateTimeFormatter object represents a date and time formatter. Members Table The following table lists the members provided by the DateTimeFormatter object.
Members
Properties | Description
DateFormatString | Date format string.
Force24Hour | Whether to use 24 hour mode.
LCID | Locale ID.
LongDate | Whether to use long date information.
NoSeconds | Whether to hide seconds.
TimeFormatString | Time format string.
Methods | Description
FormatDate | Formats a date.
FormatTime | Formats a time.
Remarks This object is returned by the SiteKioskUI.CreateDateTimeFormatter or SiteCafe.CreateDateTimeFormatter method. Use the DateTimeFormatter object to format date and time information. Note that the path of a file using SiteKiosk objects must be allowed in the SiteKiosk configuration (Security -> Access -> URL's With Script Permission) if it is not a browser skin file. Examples The following example shows the complete date information of the last logfile message.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    last = SiteKiosk.Logfile.LastMessages.Count;
    myDate = SiteKiosk.Logfile.LastMessages.Item(last).LocalTime;
    myDTF = SiteKiosk.SiteKioskUI.CreateDateTimeFormatter();
    alert(myDTF.FormatDate(myDate));
    </SCRIPT>
Applies to SiteKiosk v6.0 (and later versions). Back to top