Module: ActiveRecord::ConnectionAdapters::Sqlserver::CoreExt::ODBC::TimeStamp

Defined in:
lib/active_record/connection_adapters/sqlserver/core_ext/odbc.rb

Instance Method Summary collapse

Instance Method Details

#to_sqlserver_stringObject



9
10
11
12
# File 'lib/active_record/connection_adapters/sqlserver/core_ext/odbc.rb', line 9

def to_sqlserver_string
  date, time, nanoseconds = to_s.split(' ')
  "#{date} #{time}.#{sprintf("%03d",nanoseconds.to_i/1000000)}"
end