javascript - Enable datetime selection in ruby on rails -


i new ruby on rails. want display date format yyyy-mm-dd hh:mm:ss. on using calendar_date_select method :time=>true in view, able display format yyyy-mm-dd hh:mm. there method overwrite current diplaying format format need?

you can use 'strftime' method on dates format desire.

ex.

time = time.now time.strftime('%y-%m-%d %i:%m:%s %p')    #this gives 2015-07-15 08:28:38 pm 

Comments

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -