require 'time'
require 'date'
t = Time.now
d = DateTime.now
dd = DateTime.parse(t.to_s)
tt = Time.parse(d.to_s)
http://stackoverflow.com/questions/279769/convert-to-from-datetime-and-time-in-ruby
require 'date'
t = Time.now
d = DateTime.now
dd = DateTime.parse(t.to_s)
tt = Time.parse(d.to_s)
http://stackoverflow.com/questions/279769/convert-to-from-datetime-and-time-in-ruby
No comments:
Post a Comment