Forums / Setup & design / Date format / Comment14912
Alex Jones
Wednesday 03 March 2004 6:59:27 am
Here is the code I am currently using to display a date in a press release (the date field is named <i>released</i>):
{$:item.data_map.released.data_int|datetime(custom,"%F %j, %Y")}
Just sub <i>data</i> or whatever you have named your date field for <i>released</i> and it should work. It's important to remember that dates are not text fields (data_text), rather they are stored purely as integers (data_int) which I believe, is where the problem lies in your code.
Alex
Alex [ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ] <i>When in doubt, clear the cache.</i>