From: "Vapor .." Date: 2007-12-10T14:20:14+09:00 Subject: Re: How to get date out of datetime field? Gavin Kistner wrote: > On Dec 9, 3:21 am, "Vapor .." wrote: >> I have a field in db with datetime format and it contains more than just >> simple date. How can I get only date from it? > > What does your format look like? > What database are you using? > How are you connecting Ruby to the database? Are you using > ActiveRecord? Something else? > > Do you already have instances of a Ruby Time class? DateTime class? > > Do you want an instance of a Date class? Do you just want to visually > display the date only information? > > More information required... oh well I am using MySQL and when I look into it, it shows something like '2007-12-10 18:58:17' like this. And I am using all the default settings (ActiveRecord and stuff) -- Posted via http://www.ruby-forum.com/.