From: Justin Collins Date: 2013-07-03T03:38:07+09:00 Subject: Re: How can I add minutes,seconds and hours to a DateTime object? On 07/02/2013 11:23 AM, Love U Ruby wrote: > require 'date' > require 'time' > > text_t = "1:40 PM ET" > dt = DateTime.parse(text_t) # => # ((2456476j,49200s,0n),+0s,2299161j)> > dt.send(:minute) # => 40 > dt.minute # => 40 > > Any way to add say 2 hours,5 minutes and 2 seconds to the `dt` object. > 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-Date -Justin