Reputation:
I am trying to output a string that represents the current date/time in a format like this "yyyyMMddHHmm". For example, "201310310759" for "7:59am on 10/31/2013".
This is what I have so far:
Date.today.to_formatted_s(:db).gsub("-","")
Upvotes: 3
Views: 691