2012-07-16 41 views

回答

5

因爲%I是小時...嘗試:

{$smarty.now | date_format : "%Y-%m-%d"} 

%M - 每月的十進制數(範圍從01到12)

Docs are here for date_format

+0

哦,我的。 ..這麼愚蠢的錯誤... Thx很多! – tinybai 2012-07-16 09:07:16

+0

如果你使用的是Smarty3,你也可以使用date()格式:'{$ smarty.now | date_format:「Y-m-d」}' – rodneyrehm 2012-07-16 09:08:44

相關問題