How to convert Time format in ruby

You can easily do that by using the strftime method, in this case it would be something like this:

Time.now.strftime("%d/%m/%Y %H:%M")

You can find the complete docs here: http://apidock.com/ruby/DateTime/strftime

Leave a Comment