datetime

Summary

Formats dates/times according to settings in "datetime.ini".

Usage

{$input_date|datetime( preset_format [, format ] )}

Parameters

NameTypeDescriptionRequired
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

Returns

String representation of $input_date

Description

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

Examples

{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

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
       datetime
       i18n
       l10n
       si
       x18n
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:35:44 am
by Balazs Halasy

Last updated

06/02/2004
1:04:01 pm
by Kåre Køhler Høvik

Authors

Balazs Halasy
Kåre Køhler Høvik



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.