EKM Tag: [ekm:date]
This tag is used to output the current date on the page.
- Tag Information
- Nesting This Tag
Basic Use
The tag will output, in plain text, the current date.
[ekm:date][/ekm:date]
This outputs the following.
Wednesday 13-Mar-1989
Advanced Use
The tag will output, in plain text, the current date.
[ekm:date]format='%d/%m/%Y';[/ekm:date]
This outputs the following.
13/03/1989
Tag Attributes
Format
format='%Y';
Specify the format you want the date and time to output.
Value
Description
%Y
Outputs the current year in full. Example: 2018
%y
Outputs the current year as shorthand. Example: 18
%m
Outputs the current month as a number. Example: 02
%B
Outputs the current month in full. Example: June
%b
Outputs the current month as shorthand. Example: Jun
%d
Outputs the current day of the month as a number. Example: 23
%O
Outputs the current day of the month's ordinal indicator. Example: st, nd, rd or th
%j
Outputs the current day of the year. Example: 54
%w
Outputs the current day of the week as a number. Example: 0 for Sunday or 5 for Friday.
%a
Outputs the current day of the week in full. Example: Friday
%A
Outputs the current day of the week as shorthand. Example: Fri
%H
Outputs the current hour in 24 hour format. Example: 23
%h
Outputs the current hour in 12 hour format. Example: 11
%N
Outputs the current minute. Example: 01
%n
Outputs the current minute unless it is 00, in which case it's blank. Example: 12
%S
Outputs the current second. Example: 55
%P
Outputs the time as AM/PM. Example: PM
The EKM system allows for some tags to be nested within other tags.
Nesting This Tag
When nesting this tag you do not need to make any changes to it. It can be inserted into other tags like below.
[ekm:showdata]
...
output_item='[ekm:date][/ekm:date]';
...
[/ekm:showdata]