Rails default date format

Hello All,

How can i convert the date format “2010-01-01” to rails default date
format. I mean to “Fri, 14 May 2010”?

Is there any built in function for it… Googled but …?

On Fri, May 14, 2010 at 17:50, Hemant B. [email protected]
wrote:

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Maybe this URL could help you
http://api.rubyonrails.org/classes/Logger.html#M000271

On 14 May 2010 10:50, Hemant B. [email protected] wrote:

Hello All,

How can i convert the date format “2010-01-01” to rails default date
format. I mean to “Fri, 14 May 2010”?

You can use Date.strptime to parse it then strftime to format it to
whatever format you like.

Colin

There is also

validates_date_time plugin

http://agilewebdevelopment.com/plugins/validates_date_time

if you also want to allow entry in other formats

Tonypm