format date time rails view code example Example: format date rails created long active_record.created_at.to_formatted_s(:long)