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 ..?
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 ..?
Maybe this URL could help you http://api.rubyonrails.org/classes/Logger.html#M000271
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