Postgresql timeStamp and ruby Time.now?

Hi,

I have a postgresql DB table which has “timeStamp” field, I wonder if it
is a good way to store time with ruby-rails “Time.now” with a
“timeStamp” field??? or will it better to store the “Time.now” into a
“varchar” or “text”???

does anyone have an idea?

Thanks you very much

Sayoyo

I vote timestamp if you ever want to alter it. but varchar if it is read
only

I use timestamp column type. Also, if you name your columns as
created_on and updated_on you don’t have to populate it, Rails will do
it automatically for you.

I will definitively use timeStamp:)

Thanks you very much for the information!!!

sayoyo

Ahmad wrote:

I use timestamp column type. Also, if you name your columns as
created_on and updated_on you don’t have to populate it, Rails will do
it automatically for you.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs