ActiveRecord date format
        Posted  
        
            by Mongus Pong
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mongus Pong
        
        
        
        Published on 2010-03-27T16:22:33Z
        Indexed on 
            2010/03/27
            21:43 UTC
        
        
        Read the original article
        Hit count: 199
        
I've run into a spot of bother with date formats in our Rails application.
I have a date field in our view which I want to be formatted as dd/mm/yy. This is how the user will expect to enter their dates, and the datepicker control uses this format.
However, Active Record seems to be expecting mm/dd/yy.
If I enter 01/03/2010, this gets put in as 03 January 2010.
If I enter 25/03/2010, this gets put in a null.
How do I get ActiveRecord to expect Her Majesties date format?
© Stack Overflow or respective owner