Date/Time Formatting Demo

Test Document

How to use this form

The date displayed in red below uses a default pattern. If you want to store the created date in another format, enter it in the Format field and press the Save button. You will be taken in to read-mode and the date will display as you set it out. Open the view using the link above and you'll see the date displayed in a shorter form.

Simple Form
Sunday 20 May 2018, 8:23:28 PM

Example Formats

Format StringOutput
dddd dd mmmm yyyy, h:nn:ss AM/PMFriday 05 August 2005, 5:37:28 PM
dd mmm yyyy, hh:nn AM/PM05 Aug 2005, 05:36 PM
mm.dd.yyyy, h:nn:ss AM/PM08.05.2005, 5:34:53 PM
mmm dd, 'yyAug 05, '05

Formatting Codes

Formatting codeMeaning
: (colon)Time separator. Separates hours, minutes, and seconds in formatted time values. The actual time separator used in the returned formatted value is the time separator specified for the given country in the operating system's international settings.
/ (slash)Date separator. Separates day, month, and year in formatted date values. The actual date separator used in the returned formatted value is the date separator specified in the operating system's international settings.
cDisplays a date as ddddd, and a time as ttttt (see below). If the value includes no fractional part, only a date is displayed. If the value includes no integer part, only a time is displayed.
yDay of the year as a number (1 - 366).
dDay of the month as a number without a leading zero (1 - 31).
ddDay of the month as a number with a leading zero
(01 - 31).
dddWeekday as a three-letter abbreviation (Sun - Sat).
ddddWeekday spelled out (Sunday - Saturday).
dddddSerial date number as a complete date (day, month, and year) formatted as an international Short Date string. If there is no Short Date string provided in the operating system, the date format defaults to mm/dd/yy.
ddddddSerial date number as a complete date (day, month, and year) formatted as an international Long Date string. If there is no Long Date string provided in the operating system, the date format defaults to mmmm dd, yyyy.
wWeekday as a number (1 - 7). Sunday is 1.
wwWeek of the year as a number (1 - 53).
mMonth of the year as a number without a leading zero (1 - 12). If the character is preceded by h in fmt, it displays the minute of the hour as a number without a leading zero (0 - 59).
mmMonth of the year as a number with a leading zero (01 - 12). If the character is preceded by h in fmt, it displays the minute of the hour as a number with a leading zero (00 - 59).
mmmMonth name as a 3-letter abbreviation (Jan - Dec).
mmmmMonth name spelled out (January - December).
qQuarter of the year as a number (1 - 4).
yyThe last two digits of the year (00 - 99). If you specify yy in Notes or Domino, LotusScript interprets 50 through 99 as the years 1950 through 1999 and 00 through 49 as the years 2000 through 2049. Note that SmartSuite interprets yy differently.
yyyyThe full (four-digit) year (0100 - 9999).
hHour of the day as a number without a leading zero (0 - 23).
hhHour of the day as a number with a leading zero
(00 - 23).
nMinute of the hour as a number without a leading zero (0 - 59).
nnMinute of the hour as a number with a leading zero (00 - 59).
sSecond of the minute as a number without a leading zero (0 - 59).
ssSecond of the minute as a number with a leading zero (00 - 59).
tttttTime serial number as a complete time (including hour, minute, and second), formatted using the time separator provided in the operating system's international settings. A leading zero is displayed if the international leading zero setting is TRUE and the time is before 10:00 AM or PM. The default time format is h:mm:ss.
AM/PM am/pmUses hour values from 1 to 12, displaying AM or am for hours before noon, and PM or pm for hours after noon.
A/P a/pUses hour values from 1 to 12, displaying A or a for hours before noon, and P or p for hours after noon.
AMPMUses hour values from 1 to 12. Displays the contents of the 1159 string (s1159) in WIN.INI for hours before noon, and the contents of the 2359 string (s2359) for hours after noon. AMPM is case-insensitive, but the case of the string displayed matches the string as it exists in the operating system's international settings. The default format is AM/PM.