Template Tag
{exp:dt}
Will return the date formatted this way: MM/DD/YYYY
{exp:dt:wrap}
New in v1.3
{exp:dt:wrap day="-1" parse="inward"}
{exp:channel:entries
channel="products"
dynamic="off"
start_on="{dt_ee}"
}
<strong>{entry_date format="%Y-%m-%d %H:%i"}</strong> - {title}<br />
{/exp:channel:entries}
{/exp:dt:wrap}
Parameters
set=[optional]
Sets the static date that the other parameters will reference. If not set will default to the current date.
{exp:dt set=“01/01/2010”}
Returns 01/01/2010
format=[optional]
Sets the format of the returned date using the following parameters:
http://expressionengine.com/user_guide/templates/date_variable_formatting.html
{exp:dt set=“11/03/90” ee_format=“true” format=”%l %M %j, %Y”}
Returns Saturday Nov 3, 1990
ee_format=[optional]
if set to ‘false’ dt will parse the date using php formating:
http://php.net/manual/en/function.strftime.php
{exp:dt set=“11/03/90” format=”%A %b %e, %Y”}
Returns Saturday Nov 3, 1990
year=[optional]
Adds or subtracts a value in years to current/set date.
month=[optional]
Adds or subtracts a value in months to current/set date.
day=[optional]
Adds or subtracts a value in days to current/set date.
{exp:dt day=“3” month=“1” year=”-1” set=“1/1/2010”}
Returns 02/04/09
hour=[optional]
Adds or subtracts a value in hours to current/set date.
minute=[optional]
Adds or subtracts a value in minutes to current/set date.
second=[optional]
Adds or subtracts a value in seconds to current/set date.