Forums / Setup & design / Date format / Comment14918

Author Topic

Kevin Myles

Thursday 22 July 2004 9:25:56 am

Comment14918

I was having a similiar issue.

I wanted the date to be shown in the article line, so i tookt he code from the article view and plugged it in, but it was showing it in a format i didn't want.

Playing with the code, i had some problems

             {$node.object.published|l10n(custom,"%F %d, %y")}
{$date|datetime(custom,"%F %d, %y")}
$node.object.data_map.data.data_int|datetime(custom, '%d.%m.%Y')
{$node.object.published|l10n(custom,"%F %d, %y")}
{$:item.data_map.published.data_int|datetime(custom,"%F %j, %Y")}
{$:item.data_map.date.data_int|datetime(custom,"%F %j, %Y")}
{$:item.data_map.published.data_int|datetime( 'custom', '%d.%m.%Y')}
{$node.object.data_map.data.data_int|datetime(custom, '%d.%m.%Y')}
{$node.object.published|datetime(custom, '%F %d, %Y')}
{$node.object.published|datetime( 'custom', '%d.%m.%Y')}

all of this code, in the article line template, would yield me:

1090416091
December 31, 69
$node.object.data_map.data.data_int|datetime(custom, '%d.%m.%Y')
1090416091
December 31, 1969
December 31, 1969
31.12.1969
31.12.1969
July 21, 2004
21.07.2004

Eventually, it worked out because i tried almost everything.
anyway, if you're having problems, fiddle with the code above and see what happens.