Marnen Laibow-Koser wrote: > Yannick Yanikos wrote: >> Hello, >> >> I have a problem with date when saving into my sql with rails 3. >> >> Into my environment.rb file i put Date::DATE_FORMATS[:default] = >> "%d/%m/%Y" >> >> i created a jquery calendar and into the text field the date is for >> example 01/10/2010. > > Is this supposed to be 1 October or 10 January? > >> When i save, the date saved is 10/01/2010. the monthes and the days are >> inversed. >> >> >> into the log parameter is : "birthday"=>"01/10/2010" >> >> and the update (db) : UPDATE `profiles` SET `birthday` = '2010-01-10' >> ... >> >> format is saved as MM/DD/YYYY > > ...so it's saving to the DB as 10 January. Is that what you want, or do > you want 1 October? > >> >> Does anyone know how to make this work ? >> >> Thank you. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > [email protected]
It seems to save correctly, just the display is wrong. In the US, 1/10/69 should be jan 10,1969, but after the save, it displays as 10/1/69 Bob -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "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]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

