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

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -