Forum: Ruby on Rails Input date in different format

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.
Jonathan V. (Guest)
on 2006-01-19 06:55
(Received via mailing list)
Hey there,

I would like to be able to enter dates in a few different formats. As
well as the standard 2006-01-01 format I want to be able to enter it in
m/d/yy format (eg 1/1/06 for 2006-01-01), and d mmm yy (eg 1 Jan 06).
What's the simplest way to do this? I had a go at changing
ActiveRecord::ConnectionAdapters::Column.string_to_date, and that
*seems* to work, but I'm not sure if it is the best way. Anyone done
this or got any pointers?

Cheers, -Jonny.
This topic is locked and can not be replied to.