search

Home  >  Q&A  >  body text

java - freemarker number_to_datetime的问题

最近刚使用freemarker

数据库中存的是时间截,使用的是System.currentTimeMillis();

在freemarker模块中,使用

${user.regtime?numbertodatetime} 总是出错

Caused by: freemarker.core.NonNumericalException: For "?numbertodatetime" left-hand operand: Expected a number, but this has evaluated to a string+extended_hash (String wrapped into f.e.b.StringModel):
==> (x) [in template "WEB-INF/views

但直接这样写却能正常显示:


${x.numbertodatetime} 这样就可以

阿神阿神2771 days ago1100

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-17 14:40:20

    Why is this website still underlined?

    reply
    0
  • Cancelreply