Using PHP's DateTime in JavaScript -
i utilize datetime in mysql. have 2014-10-31 00:00:00
in database.
from api, when homecoming query, have loop through them , convert datetime timestamp using strtotime()
. in javascript, can utilize multiplying timestamp 1000.
however, there way pass pure datetime javascript , conversion there?
you can create mysql work:
select (unix_timestamp(date_field) * 1000) jstimestamp table;
alternatively, moment pretty much gold standard javascript date work , can read mysql-style strings right out of box.
javascript php mysql datetime
No comments:
Post a Comment