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
Post a Comment