rashantha wrote:> How do you assign time to a variable.
Google and/or use ri on your command line for Time#now
> ie:
>
> 9:30 AM
>
> party = cccc.to_time ?
party = Time.parse(''9:30 am''). But I''m not sure what
it will do about the date.
In Rails, 9.hours + 30.minutes might also work, to get the seconds from midnite.
> how about military time?
Time.now.strftime(''%H:%M'').
Google strftime to learn the correct codes to put in there.
--
Phlip
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---