Date and Time Conversion in Ruby
Posted
by dkris
on Stack Overflow
See other posts from Stack Overflow
or by dkris
Published on 2010-06-16T05:28:03Z
Indexed on
2010/06/16
5:32 UTC
Read the original article
Hit count: 470
I am currently looking on converting Thu Jun 10 16:17:55 +0530 2010
to 15/06/2010
or 15-06-2010
using Ruby
I am getting the dates from the DB as shown below.
@tickets = Ticket.find(:all)
for ticket in @tickets
print ticket.created_at
end
I have been looking around for resources as I a n00b in RoR/Ruby.
I have looked at
and couldn't make much of it.
Please let me know how I could achieve this conversion in Ruby.
© Stack Overflow or respective owner