Ruby Language Time How to use the strftime method


Converting a time to a string is a pretty common thing to do in Ruby. strftime is the method one would use to convert time to a string.

Here are some examples:"%Y-%m-d %H:%M:S") #=> "2016-07-27 08:45:42"

This can be simplified even further"%F %X")  #=> "2016-07-27 08:45:42"