On Tue, 18 Jul 2006, Wes Gamble wrote: > Wes Gamble wrote: >> Wow - dates and times sure are all over the place in Ruby. >> >> I want to initialize a DateTime object to have MDY of 12/30/1899 but >> time components matching the current time. >> >> I've tried: >> >> DateTime.strptime("%Y-%m-%d %h:%M:%S", "1899-12-30 >> #{time.hour}:#{time.min}:#{time.sec}") >> >> but strptime doesn't seem to like it. >> >> Do I need to use a Time object - where's the correct string parsing >> method for me to use? DateTime is the class to use if you need to represent a wide range of dates. Time only works for a narrow range starting at Jan 1, 1970. foo = DateTime.new(1899,12,30,8,30,33) foo.asctime => "Sat Dec 30 08:30:33 1899" Kirk Haines