Hello, I need to use Date or DateTime for a column instead of Time because I have need to include dates older than 1970. I am using SQL Server for a backend. I have been experimenting with changing the column type in SQL Server, but active record always seems to Time regardless of what the column type is. Is there something I need to declare in my model? I can''t seem to get active record to use anything but Time. Thanks, Dan --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
shane
2006-Dec-21 02:58 UTC
Re: changing active record to use date or datetime instead of time
you may want to use float (int) and store the number of seconds since an epoch of your liking and do some swizzling to make it available in the model''s attributes the way you prefer to clients of the model. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---