date formatting
| From: | Peggy Schatz | Date: | Thu, 04 Oct 2007 12:59:08 +0000 |
| Subject: | date formatting | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13761@lists.php.net to get a copy of this message | ||
hello,
in my template I have an input field which contains the date a shelf expires.
<input type="text" name="{$shelf_expire.name}" value="{$shelf_expire_value}" class="bg{$shelf_expire.farbe}" size="{$shelf_expire.breite}" {$shelf_expire.readstatus} />
Given the value for $shelf_expire_value is 2099-12-31 the template returns just that.
If I use:
value="{$shelf_expire_value|date_format:'%d.%m.%Y'}" instead of value="{$shelf_expire_value}" I get the result: 04.10.2007, which is today's date...
Is date_format only working with a certain type (format) of string? How can I get the desired output of: 31.12.2099?
Thanks in advance,
Peggy