Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:55:54+00:00 2026-05-26T18:55:54+00:00

In my RoR app, a table gets created in this way: class CreateEmailMessages <

  • 0

In my RoR app, a table gets created in this way:

class CreateEmailMessages < ActiveRecord::Migration
  def self.up
    create_table :email_messages do |t|
      t.string :recipient
      t.string :subject
      t.text :text
      t.text :html
     t.string :status
      t.belongs_to :owner
      t.text :data
      t.timestamps
    end
  end
...
end

later on, I try to access the created_at field using:

    <td>
      <%= email_message.created_at %>
    </td>

however this only returns a date.
how I can get the timestamp?

in the database, the field i’m looking for looks like this:

2011-11-10 19:16:59.056382

i’ve even added this:

config.active_record.record_timestamps = true

but still no luck.
how I can get the timestamp with the date?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:55:54+00:00Added an answer on May 26, 2026 at 6:55 pm

    You could try <%= email_message.created_at.to_s(:db) %>
    or one of the other to_s format options listed here:

    http://apidock.com/rails/ActiveSupport/TimeWithZone/to_s#311-Full-List-of-Supported-Formats

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a RoR app, but this is a general question of strategy
So I have this in my RoR app, it works in FF, Chrome, and
I've created simple ROR app on Heroku's server and I want to add product
In a RoR app, I want to specialize ActiveRecord's update_attributes() method in one of
I'm making a RoR app that has 3 resources, that are nested in this
I'm using Savon in my RoR app. This is my call to the service:
I've created simple Engine for my App written in RoR 3.0.x How can I
I have recently moved my RoR app on the Heroku platform, and almost everything
I am trying to add full text search capabilities to my RoR app, but
I am trying use a Java Uploader in a ROR app (for its ease

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.