My Dear Friend,

Here is the executed code for time
irb(main):001:0> t=Time.now
=> Fri Jan 20 14:47:46 +0530 2012
irb(main):002:0> t=t.to_s
=> "Fri Jan 20 14:47:46 +0530 2012"
irb(main):003:0> t.split(" ")
=> ["Fri", "Jan", "20", "14:47:46", "+0530", "2012"]
irb(main):004:0> t.split(" ")[3]
=> "14:47:46"
On Fri, Jan 20, 2012 at 2:54 PM, Michael Pavling wrote:

On 20 January 2012 09:20, Santosh Kumar Mohanty
wrote:
I dont have much Idea

t=Time.now
t.split(" ")[3]
you will get the ruby time format
As far as I can see, Time does not respond to ".split"

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 8 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 20, '12 at 9:07a
activeJan 20, '12 at 10:26a
posts8
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase