ruby - Accessing the date from a timestamp query result rails -
i writing script , query database lastly entered timestamp in table. result this:
#<utilityreading timestamp: "2013-02-18 23:30:00">
i wondering how access date result?
if utilityreading in variable called @utility
, example, phone call @utility.timestamp.to_date
.
ruby-on-rails ruby timestamp
No comments:
Post a Comment