Created_on & updated_on - helper to display date only

All,

My initial list is rather busy. I would like to shorten the
created_on and updated_on fields to just display the date, not the
time. Best wold be a simple 12/28/05 type of presentation.

I’ve found the format helpers in rdoc. (ie.
distance_of_time_in_words_to_now ), but none seem to be what I’m
looking for.

How do I control the date format of a timestamp field?

Thanks
Greg

Greg F.
The Norcross Group
Forensics for the 21st Century

On 12/27/05, Greg F. removed_email_address@domain.invalid wrote:

How do I control the date format of a timestamp field?

Thanks
Greg

Greg F.
The Norcross Group
Forensics for the 21st Century

http://rails.rubyonrails.com/classes/ActiveSupport/CoreExtensions/Time/Conversions.html

http://ruby-doc.org/core/classes/Time.html#M000249


rick
http://techno-weenie.net

On 12/27/05, Rick O. removed_email_address@domain.invalid wrote:

http://ruby-doc.org/core/classes/Time.html#M000249

.to_date was exactly what I wanted, thanks.

Newbie question: I’ve got the pickaxe book and looking at the Time
class (pg 642-649), I don’t see a .to_date method. Am I looking in
the wrong place, or is the book out of date?

Thanks
Greg

Greg F.
The Norcross Group
Forensics for the 21st Century

I’ve found the format helpers in rdoc. (ie.
distance_of_time_in_words_to_now ), but none seem to be what I’m
looking for.

How do I control the date format of a timestamp field?

Thanks
Greg

It’s a method added by rails. Notice the first link I gave you was
for ActiveSupport (the Rails lib that adds those niceties, and other
things like string inflection and fixnum extensions).


rick
http://techno-weenie.net