Date-Time Format in Ruby
In Ruby, you have to format or convert time from one format to other many a times. You can use library method strftime available to perform formatting operations.
Once I have faced this error in my terminal window,
Syntax of strftime: strftime( format )
Returns: Result in requested format
First of all, let us create a new variable in which we get current time to be formatted in various formats,