Skip to content

Instantly share code, notes, and snippets.

@deanlxvii
Created April 23, 2011 06:13
Show Gist options
  • Save deanlxvii/938388 to your computer and use it in GitHub Desktop.
Save deanlxvii/938388 to your computer and use it in GitHub Desktop.
ruby string to datetime
require 'date'
datetime_string = "2010-04-06T00:00:00"
datetime = DateTime.strptime(datetime_string,"%Y-%m-%dT%H:%M:%S")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment