<% if schedule.date_scheduled.strftime('%I:%M %p') == '12:00 AM' %> <td class="leftAlign">TBA</td> <% else %> <td class="leftAlign"><%=h schedule.date_scheduled.strftime('%I:%M %p') %></td> <% end %>
Works fine - datetime formats that are say "2009-06-30 17:30:00" will show up as: => 05:30 PM But if I change this to a 12-hour clock without the leading 0 using schedule.date_scheduled.strftime('%l:%M %p') => .. nothing.. If I'm not using the correct formatting string for a 12-hour clock without the leading 0, which is the correct output? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---