Class Time
In: lib/time.rb
Parent: Object

Methods

to_sql  

Public Instance methods

Returns a string that represents a database agnostic time.

   Time.at(946702800).to_sql     #=> "to_timestamp('2000-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')"

[Source]

   # File lib/time.rb, line 7
7:   def to_sql
8:     "to_timestamp('" + formatted + "', 'YYYY-MM-DD HH24:MI:SS')"
9:   end

[Validate]