Rails formatting date
Use Model.created_at.strftime(“%FT%T”) where, %F – The ISO 8601 date format (%Y-%m-%d) %T – 24-hour time (%H:%M:%S) Following are some of the frequently used useful list of Date and Time formats that you could specify in strftime method: Date (Year, Month, Day): %Y – Year with century (can be negative, 4 digits at least) -0001, 0000, … Read more