Date Conversion

Can someone help me format the following date into a db-friendly
datetime value?

Here is the date I get from an XML file…
xmldate = “2010-03-31T07:47:46 -500”

But xmldate.to_datetime isn’t handling the timezone…

Any ideas how I get to this?..


Please, try it:

DateTime.parse(“2010-03-31T07:47:46 -500”).to_s

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs