[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to format date in tpl-file

Posted on 2011-10-05
3
Medium Priority
?
282 Views
Last Modified: 2012-08-14
Hi!

Have the included source, that display the date field like -> 2011-10-05 -> $row.event_from_date
But how do i format the date field to display -> 05.10.2011 ?


<div style="padding-top:2px; padding-left: 6px; padding-bottom:2px; padding-right:4px;">
    <br /> 
	{foreach item=row from=$singeltr_data}
	    
		<span class="newshead_tilp"><b>{$row.event_title|stripslashes}</b></span><br/>
		<span class="newsdate">Startdato: {$row.event_from_date}</span><br />
		<a href='{$row.event_link}' >{lang mkey='more'}</a>
		
		<br/><br />
	{/foreach}

</div>

Open in new window

0
Comment
Question by:team2005
3 Comments
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36915645
0
 
LVL 15

Accepted Solution

by:
Insoftservice earned 2000 total points
ID: 36915840
{$row.event_from_date|date_format:"%d/%b/%Y"} will give you o/p  as 28/Sep/2011

{$row.event_from_date|date_format:"%d.%m.%Y"} will give you o/p  as 05.10.2011.
0
 
LVL 2

Author Closing Comment

by:team2005
ID: 36916097
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question