RE: [SMARTY] Datestamp in html??
| From: | SP | Date: | Mon, 01 Jul 2002 07:38:31 +0000 |
| Subject: | RE: [SMARTY] Datestamp in html?? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5116@lists.php.net to get a copy of this message | ||
Avern, it looks like a bug. The %D didn't work for me either but if you put
%m/%d/%y then you'll get what you want.
-----Original Message-----
From: Avern Williams [mailto:avern@hotmail.com]
Sent: July 1, 2002 2:50 AM
To: smarty-general@lists.php.net
Subject: [SMARTY] Datestamp in html??
Hi,
I'm pretty new to smarty and to php. What I want to do is have the curent
date appear in a smarty template. The date can be in %m/%d/%y format, and
it will be used as a hidden tag in a form.
I've tried putting <INPUT TYPE=HIDDEN NAME="dateposted"
VALUE="{$smarty.now|date_format:"%D"}"> in my smarty template, but it gets
hung (understandably) on the double quotes. I've also tried <INPUT
TYPE=HIDDEN NAME="dateposted"
VALUE="{$smarty.now|date_format:'%D'}"> but
that didn't work either. Does anyone have any suggestions?
My ultmate goal is to put the current date into a mysql date field after the
form is submitted. Would it be better to just have some php code get the
current and then pass it to the template?
thanks,
Avern
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php