search for: time_array

Displaying 4 results from an estimated 4 matches for "time_array".

Did you mean: name_array
2006 Jun 23
0
Multiparameter error
...ement them. This is from the wiki require ''date'' # It''s necessary to do this, because Time doesn''t # support dates before 1970... class ActiveRecord::ConnectionAdapters::Column def self.string_to_time(string) return string unless string.is_a?(String) time_array = ParseDate.parsedate(string)[0..5] begin Time.send(Base.default_timezone, *time_array) rescue DateTime.new(*time_array) rescue nil end end end Any help would be appreciated Jeff -- Posted via http://www.ruby-forum.com/.
2006 Jul 17
18
Inserting datetime value into SQL Server
I have a SQL Server column named StartTime of (SQL Server) type datetime If I attempt to set the attribute using public def StartTime=(time) write_attribute(:StartTime, "{ts ''1899-12-30 #{time.hour}:#{time.min}:#{time.sec}''}") end it''s inserting a NULL value. Anyone else able to successfully insert a date time value into a SQL Server table using
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2006 Apr 26
5
accessing created_on causes type error
I assume that this is some newbie stupidity, but I haven''t found my way around this problem. I have an ActiveRecord object fetched from the database, and I need to evaluate the contents of the updated_on field. However, *any* attempt to access that data in the program results in a TypeError with the message ''no implicit conversion from nil to integer''. cust =