From: Love U Ruby Date: 2013-07-03T04:24:18+09:00 Subject: Re: How can I add minutes,seconds and hours to a DateTime object? Justin Collins wrote in post #1114234: > On 07/02/2013 11:23 AM, Love U Ruby wrote: >> > No, you cannot modify Date/DateTime objects. You must create a new one > with the values you want: > http://www.ruby-doc.org/stdlib-2.0/libdoc/date/rdoc/Date.html#label-DateI I reached till this point: require 'date' text_t = '2:12:03 PM ET' dt = DateTime.parse(text_t, '%I:%M %p %Z') # => # dt.to_s # => "2013-07-03T14:12:03+00:00" Date._strptime(dt.to_s,'%Y-%m-%dT%H:%M:%S%z') # => {:year=>2013, # :mon=>7, # :mday=>3, # :hour=>14, # :min=>12, # :sec=>3, # :zone=>"+00:00", # :offset=>0} Any way to convert this Hash object back to Date object? If that can be done,I think problem will be solved. -- Posted via http://www.ruby-forum.com/.