ez.no / exponential / documentation / reference / template operators / formatting / datetime
{$input_date|datetime( preset_format [, format ] )}
| Name | Type | Description | Required |
|---|---|---|---|
| preset_format | string | Preset datetime format set in datetime.ini | yes |
| format | string | Custom datetime format used when preset_format is set to 'custom | no |
String representation of $input_date
Formats dates and times according to formats defined in datetime.ini. Custom formats in the template itself are also possible.
More information about custom formating can be found here :
Date and Time Formats{currentdate()|datetime( 'mydate' )}
return 13:15 6 Feb 2004
{currentdate()|datetime( 'custom', '%h:%i %a %d %F %Y' )}
return 01:15 pm 06 February 2004
log in or create a user account to comment.
Comments