Forum: Ruby on Rails date environment.rb

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
F87d150876b608711d5fc8154a8038c9?d=identicon&s=25 Herman Müller (gotzbold)
on 2009-05-17 20:21
Hi Ruby-Comunity!

I have a problem with date format.

To display the german date format, I put on the end of environment.rb:

=> '%d.%m.%Y')
=> '%d.%m.%Y %H:%M:%S')

In index/show.html.erb datetime is displayed like expected:

05.06.2009 10:00:00

In edit.html.erb datetime is not displayed in german date format:

<%= f.text_field :valid_from %> --> displays

2009-05-05 00:00:00

Have somebody a solution?

Thanks ahead!!


84fbb9c2a7b05c3ddf39904514585a90?d=identicon&s=25 Franco Catena (Guest)
on 2009-05-17 23:38
(Received via mailing list)
You can do this with i18n (Rails >= 2.2) setting up properly the
format in your config/locales (see examples in and
then use <%= l(some_date) %>.


Franco Catena.

On May 17, 3:21 pm, Herman Müller <>
This topic is locked and can not be replied to.