how to get “1:30 AM” from Time.now
t= Time.now #=>Fri Feb 01 01:30:10 +0530 2008
i need the output as “1:30 AM”
How to do this
how to get “1:30 AM” from Time.now
t= Time.now #=>Fri Feb 01 01:30:10 +0530 2008
i need the output as “1:30 AM”
How to do this
Use the time helper method provided at end,with the object to get the
value …strftime("%I:%M%p")
On Feb 1, 11:44 am, Ratnavel S. <rails-mailing-l…@andreas-
Thank u… It worked…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs