代码之家  ›  专栏  ›  技术社区  ›  aidan

获取template::plugin::date以接受mysql日期和日期时间

  •  2
  • aidan  · 技术社区  · 15 年前

    我正在为template::toolkit(template::plugin::date)使用日期插件,它可以很好地处理直接从mysql中提取的日期时间(yyyy-m m-dd hh:mm:ss),但不能处理日期(yyyy-mm-dd)。

    获取date.format以接受日期(不修改sql查询)的最简单方法是什么?

    谢谢。

    1 回复  |  直到 13 年前
        1
  •  5
  •   aidan    13 年前
    [% date.format(yourDateColumn _ ' 00:00:00', '%d %b %Y') %]