How could I convert the following date string into accepted format in ruby on rails
Thu, Aug 25 12:00 AM
Also I want global solution that could also go with the following formats including the above given:
August 25 2016
if variable is Time or Date class
[variable].strftime("%a, %B %d %T:%s %P")
[variable].strftime("%B %d %Y")
if you want to see more format directives
check it out http://apidock.com/ruby/DateTime/strftime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With