Answer the question
In order to leave comments, you need to log in
How to translate created_at in Ruby into the required format?
All models have the created_at field.
I want to bring it to dd.mm.yy hh:mm (01/11/2017 18:49), but I don’t know how to do it right away.
It is possible to separately output from this field, but how can you immediately?
Answer the question
In order to leave comments, you need to log in
You can use strftime
or localizel(article.created_at, format: '%e %B %Y')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question