Forum: Rails deployment How to change date format from Y/m/d to Y-m-d

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
43cf19e3d7142c223494340f93c49a8b?d=identicon&s=25 Annie smith (anniesmith)
on 2011-07-19 15:49
Hi all,

How to change date format from Y/m/d to Y-m-d in ruby?
thanks
E755752b8dbe10787b31214c817da87f?d=identicon&s=25 esha d. (esha_d)
on 2011-07-29 07:26
Date.today.strftime('%Y-%m-%d')

Esha
This topic is locked and can not be replied to.