Forum: Ruby on Rails Date transform

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.
irong (Guest)
on 2006-05-17 02:25
hi all,

i want my users to enter a date in "ddmmyyyy" format, do someone know
how may i transform it in "yyyy-mm-dd" in the controler before i add it
to the base please?

thks

irong
Conrad T. (Guest)
on 2006-05-18 04:37
(Received via mailing list)
Hi Irong, I would recommend using pop menus for both year, month, and
day.
This would eliminate parsing of a date from a user and make their life
easier as well.  BTW, you'll use the date SQL type or if you're using
migrations, you'll use the date ruby type.

Good luck,

-Conrad
irong (Guest)
on 2006-05-18 04:46
yes i used that now, thanks for answer
This topic is locked and can not be replied to.