Thillai Narayanan
Thillai Narayanan

Reputation: 4886

Time_tag in rails 3

In time_tag, i want to show the AM or PM of the time. How to customize the helper.Since default time_tag is displaying April 15, 2012 10:55

Upvotes: 1

Views: 1083

Answers (1)

RadBrad
RadBrad

Reputation: 7304

%p is the format token to show AM/PM

time_tag(time, :format=>'%B %d, %Y %l:%M %p')

Upvotes: 4

Related Questions