开发者

Get Template::Plugin::Date to accept MySQL dates as well as datetimes

开发者 https://www.devze.com 2022-12-23 06:53 出处:网络
I\'m using the date plugin for Template::Toolkit (Template::Plugin::Date), it works well with datetimes (yyyy-mm-dd hh:mm:ss) pulled straight out of MySQL, but it will not work with dates (yyyy-mm-dd)

I'm using the date plugin for Template::Toolkit (Template::Plugin::Date), it works well with datetimes (yyyy-mm-dd hh:mm:ss) pulled straight out of MySQL, but it will not work with dates (yyyy-mm-dd).

What's the simp开发者_运维问答lest way to get date.format to accept dates (without modifying the sql query)?

Thanks.


[% date.format(yourDateColumn _ ' 00:00:00', '%d %b %Y') %]
0

精彩评论

暂无评论...
验证码 换一张
取 消