In my application I want to display the date in this format: 21st Aug,2012 07:30 PM. I have done it using strftime like this:
<%= @project.planned_start_date.strftime("%d %B %Y") if @project.planned_start_date-%>
It is displaying like this:
02 August 2012
Can someone help me out how to get the above mentioned format of date and time ?
Have you tried to format your time value using the following strftime options?:
EDIT: This is what you need then
OUTPUT: “23rd Aug, 2012 09:19 AM”