In my mako template I have:
<p>${item.addDate}</p>
It returns:
2012-12-27 19:50:00
but I would like to get:
27/12/2012 19:50
Have mako any nifty filters, format functions?
According to google, strftime
should do the job:
${post.date.strftime('%Y/%m/%d %H:%M')
Also, according to google:
<%! from time import strftime as time %>
It is the ${"%d of %B" | time}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With