TWiki Variables » Search » Category: Date & Time
Variables in this category:
- DATE -- signature format date
- DATEPICKER{} -- pop-up calendar to select a date for use in HTML forms
- DISPLAYTIME -- display date and time
- DISPLAYTIME{"format"} -- formatted display time
- GMTIME -- GM time
- GMTIME{"format"} -- formatted GM time
- SERVERTIME -- server time
- SERVERTIME{"format"} -- formatted server time
DATE -- signature format date
- Syntax:
%DATE%
- Expands to:
2025-10-09
- Date format defined as {DefaultDateFormat} in configure, default
$year-$mo-$day
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME{"format"}, SERVERTIME (this topic)
DATEPICKER{} -- pop-up calendar to select a date for use in HTML forms
- The
%DATEPICKER{}%
variable is handled by the DatePickerPlugin. - Syntax:
%DATEPICKER{ name="..." value="..." }%
- Parameters:
Parameter Description Default Example class
CSS class of input field. "twikiInputField"
class="dateField"
format
Format of resulting date value.
•%a
- abbreviated weekday name
•%A
- full weekday name
•%b
- abbreviated month name
•%B
- full month name
•%C
- century number
•%d
- the day of the month (00 ... 31)
•%e
- the day of the month (0 ... 31)
•%H
- hour (00 ... 23)
•%I
- hour (01 ... 12)
•%j
- day of the year ( 000 ... 366)
•%k
- hour (0 ... 23)
•%l
- hour (1 ... 12)
•%m
- month (01 ... 12)
•%M
- minute (00 ... 59)
•%n
- a newline character
•%p
- "PM" or "AM"
•%P
- "pm" or "am"
•%S
- second (00 ... 59)
•%s
- number of seconds since Epoch (since Jan 01 1970 00:00:00 UTC)
•%t
- a tab character
•%U
,%W
,%V
- the week number. The week 01 is the week that has the Thursday in the current year, which is equivalent to the week that contains the fourth day of January. Weeks start on Monday.
•%u
- the day of the week (1 ... 7, 1 = MON)
•%w
- the day of the week (0 ... 6, 0 = SUN)
•%y
- year without the century (00 ... 99)
•%Y
- year including the century (ex. 2012)
•%%
- a literal%
character"%Y-%m-%d"
format="%e %b %Y"
id
ID of input field, optional. "id_"
+ nameid="idStart"
name
Name of input field.
φ: No output is shown if the name parameter is missing, but the CSS and Javascript are loaded.(requiredφ) name="Start"
Additional HTML input field attributes, such as alt
,disabled
,maxlength
,onblur
,onchange
,onfocus
,readonly
,style
,tabindex
,title
size
Size of input field, in number of characters. (calculated as needed) size="12"
value
Initial date value. ""
(today)value="2012-12-31"
- Example:
<form action="...">
%DATEPICKER{ name="Start_Date" }%
<form>
- Expands to:
- Category: ApplicationsAndComponentsVariables, DatabaseAndFormsVariables, DateAndTimeVariables, EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
- Related: DatePickerPlugin, TWikiForms (this topic)
DISPLAYTIME -- display date and time
- Syntax:
%DISPLAYTIME%
- Expands to:
2025-10-09 - 15:52
- Date part of the format is displayed as defined by the {DefaultDateFormat} in configure, default
$year-$mo-$day
. The time is shown as hh:mm (24 hour clock) - Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME{"format"}, GMTIME, SERVERTIME (this topic)
DISPLAYTIME{"format"} -- formatted display time
- Formatted time - either GMT or Local server time, depending on {DisplayTimeValues} setting in configure, default
$year-$mo-$day
. Same format qualifiers as%GMTIME%
- Syntax:
%DISPLAYTIME{"format"}%
- Supported variables:
$seconds
,$minutes
,$hours
,$day
,$wday
,$dow
,$month
,$mo
,$year
,$ye
,$tz
,$iso
,$rcs
,$http
,$epoch
- Example:
%DISPLAYTIME{"$hou:$min"}%
expands to15:52
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME, SERVERTIME (this topic)
GMTIME -- GM time
- Syntax:
%GMTIME%
- Expands to:
2025-10-09 - 13:52
- Date format defined as {DefaultDateFormat} in configure, default
$year-$mo-$day
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables
- Related: DISPLAYTIME, GMTIME{"format"}, SERVERTIME (this topic)
GMTIME{"format"} -- formatted GM time
- Syntax:
%GMTIME{"format"}%
- Supported variables:
Variable: Unit: Example $seconds
seconds 59 $minutes
minutes 59 $hours
hours 23 $day
day of month 31 $wday
day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) Thu $dow
day of the week (Sun = 0) 2 $week
number of week in year (ISO 8601) 34 $month
short name of month Dec $mo
2 digit month 12 $year
4 digit year 1999 $ye
2 digit year 99 $tz
either "GMT" (if set to gmtime),
or offset such as "-0700" (if set to servertime)GMT $iso
ISO format timestamp 2025-10-09T13:52:46Z $rcs
RCS format timestamp 2025/10/09 13:52:46 $http
E-mail & http format timestamp Thu, 09 Oct 2025 13:52:46 GMT $epoch
Number of seconds since 00:00 on 1st January, 1970 1760017966 - Variables can be shortened to 3 characters
- Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}%
expands to09 Oct, 2025 - 13:52:46
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables
- Related: DISPLAYTIME, GMTIME, REVINFO, SERVERTIME (this topic)
SERVERTIME -- server time
- Syntax:
%SERVERTIME%
- Expands to:
2025-10-09 - 15:52
- Date format defined as {DefaultDateFormat} in configure, default
$year-$mo-$day
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME, SERVERTIME{"format"} (this topic)
SERVERTIME{"format"} -- formatted server time
- Same format qualifiers as
%GMTIME%
- Syntax:
%SERVERTIME{"format"}%
- Supported variables:
$seconds
,$minutes
,$hours
,$day
,$wday
,$dow
,$month
,$mo
,$year
,$ye
,$tz
,$iso
,$rcs
,$http
,$epoch
- Example:
%SERVERTIME{"$hou:$min"}%
expands to15:52
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: DateAndTimeVariables, SystemInformationVariables
- Related: DISPLAYTIME, GMTIME, SERVERTIME (this topic)
Categories:
Administration, Applications & Components, Attachments & Files, Charting & Drawing, Database & Forms, Date & Time, Development, Editing & Content Update, Email & Notification, Export & Publishing, Formatting & Rendering, Import, Linking & Navigation, Searching & Listing, Security & Access Control, Skins & Templates, System Information, Tables & Spreadsheets, UI& Visualization, Users & Authentication, Workflow & Automation