帮助上说: 
%time(format)  
return the current date/time.  If format is nil (or missing), a long format is used.  Otherwise, use characters such as dd, mm, mmm, yy, hh, mm, ss, etc in the format string to return that part of the current date/time 
 
具体用法是: 
%time()  返回 星期五 二月 24, 2012 10:20:23 am 
 
%time(yy)  --> 年的后2位 
%time(mm)  -->月 
%time(dd)  -->日 
%time(hh)  -->时 
%time(nn)  -->分 
%time(ss)  -->秒 
 
你也可以组合使用 %time(mm月dd日hh:nn)  显示  02月24日10:24 
 
注意, %time() 取的是你本机时间, 跟服务器的北京时间略有误差 
 
 
 |