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/
Another way - from an ISO 8601 date.
var timestamp = 1293683278; var date = new Date(timestamp * 1000); var iso = date.toISOString().match(/(\d{2}:\d{2}:\d{2})/) alert(iso[1]);