Context: I have a User model with a last_logged_in_date that is a ''datetime'' column in the DB. user.last_logged_in_date gives you something like: Mon Oct 02 20:25:25 Pacific Standard Time 2006 Is there anyway to easliy convert that into a Date object so that I can use Ruby''s Date class to handle it? Thanks, Nelson -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> I have a User model with a last_logged_in_date that is a ''datetime'' > column in the DB. > > user.last_logged_in_date gives you something like: Mon Oct 02 20:25:25 > Pacific Standard Time 2006 > > Is there anyway to easliy convert that into a Date object so that I can > use Ruby''s Date class to handle it?http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Time/Conversions.html#M000227 If to_date doesn''t work exactly, look at it''s source. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---