Skip to content

Instantly share code, notes, and snippets.

Created April 18, 2014 15:13
Show Gist options
  • Save anonymous/493bf9b54317dca808ac to your computer and use it in GitHub Desktop.
Save anonymous/493bf9b54317dca808ac to your computer and use it in GitHub Desktop.
t = Time.new(1993, 02, 24)
1.9.2-p320 :877 > t.to_s
=> "1993-02-24 00:00:00 +0100"
1.9.2-p320 :878 > t.strftime("%H-%M")
=> "00-00"
1.9.2-p320 :879 > t.strftime("%Y-%H-%M")
=> "1993-00-00"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment