I am storing time in a MySQL database as a Unix timestamp and that gets sent to some JavaScript code. How would I get just the time out of it?
For example, in HH/MM/
See Date/Epoch Converter.
You need to ParseInt, otherwise it wouldn't work:
ParseInt
if (!window.a) window.a = new Date(); var mEpoch = parseInt(UNIX_timestamp); if (mEpoch < 10000000000) mEpoch *= 1000; ------ a.setTime(mEpoch); var year = a.getFullYear(); ... return time;