Re: OT: Date Formatting

Derek Haynes
2005-08-26T04:29:30Z

Ryan,

Use strftime.

ie:

date.strftime("%m/%d/%y %I:%M %p") - of course substituting in the
long month name as well.

On 8/25/05, Ryan Wood <ryan.wood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Sorry to bother with such a basic question, but I''m stuck. How
would I
> format a date field coming from MySql to display as ''January
2005''?
> Would I use strftime? or to_formatted_s? Thanks for any help.
>
> --Ryan
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Derek Haynes
HighGroove Studios - http://www.highgroove.com
Keeping it Simple.
404.593.4879