Reputation: 6542
If I have @today = Thu Apr 21 2011 00:00:00 GMT 0530 (IST),
How do I convert @today
into "Thur April 21, 2011"
?
Upvotes: 0
Views: 176
Reputation: 48606
Time.now.strftime("%a %B %d, %Y")
=> "Fri April 15, 2011"
In your occasion :
@today.to_time.strftime("%a %B %d, %Y")
=> "Thu April 21, 2011"
Upvotes: 4