2013-12-19 20 views

回答

1

你想要的是Time#strftime方法

所以你的代碼應該是這樣的:

<td colspan="2"><%= booking.created_at.strftime('%Y-%m-%d') %></td> 

<td colspan="2"><%= booking.created_at.strftime('%F') %></td>