Contents 

1st JavaScript Editor Online Help

Prev Page Next Page


Dialogs - Customize date/time format

Top Previous Next


To get this dialog, just click “Custom” from “HTML→Date and Time ” menu.

Use the following Date/Time format patterns to insert the date in your document:

c
The date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the fractional part of the DateTime value is zero.

d
The day as a number without a leading zero (1-31).

dd
The day as a number with a leading zero (01-31).

ddd
The day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.

dddd
The day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.

ddddd
The date using the format given by the ShortDateFormat global variable.

dddddd
The date using the format given by the LongDateFormat global variable.

m
The month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm
The month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm
The month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.

mmmm
The month as a full name (January-December) using the strings given by the LongMonthNames global variable.

yy
The year as a two-digit number (00-99).

yyyy
The year as a four-digit number (0000-9999).

h
The hour without a leading zero (0-23).

hh
The hour with a leading zero (00-23).

n
The minute without a leading zero (0-59).

nn
The minute with a leading zero (00-59).

s
The second without a leading zero (0-59).

ss
The second with a leading zero (00-59).

t
The time using the format given by the ShortTimeFormat global variable.

tt
The time using the format given by the LongTimeFormat global variable.

am/pm
The time using the 12-hour clock for the preceding h or hh specifier, followed by "am" for any hour before noon, or "pm" for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p
The time using the 12-hour clock for the preceding h or hh specifier, followed by "a" for any hour before noon, or "p" for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm
The time using the 12-hour clock for the preceding h or hh specifier, followed by the contents of the TimeAMString global variable for any hour before noon, or the contents of the TimePMString global variable for any hour after noon.

/
The date separator character given by the DateSeparator global variable.

:
The time separator character given by the TimeSeparator global variable.

'xx'/"xx"
Characters enclosed in single or double quotes are displayed as-is, with no formatting changes.


See also other dialogs: Preferences Find & Replace Send by Email Insert Image Insert Table HyperLink Email Link Named Anchor Form Elements Formatting JavaScript Insert special character Call JavaScript Function





   

©