The method I am using to convert Date objects to DateTime objects is:
date_obj = DateTime.parse(Date.to_s)
Is this an okay way to go about doing this? Or is there a more efficient way?
The method I am using to convert Date objects to DateTime objects is:
date_obj = DateTime.parse(Date.to_s)
Is this an okay way to go about doing this? Or is there a more efficient way?
Well, on Rails you can do
date_obj.to_date_time
It's part of ActiveSupport