$.now()
gives me the time as miliseconds. I need to show it something like hh:mm:ss
How can I do that in Jquery?
I'm way late to this, but thought i'd just throw this little snippet out there for the masses. This is something I use just to get a quick localized timestamp. It's pretty clean and handy.
function getStamp() {
var d = new Date();
var mm = d.getMilliseconds(), hh = d.getHours(),
MM = d.getMinutes(), ss = d.getSeconds();
return (hh < 10 ? "0" : "") + hh + (MM < 10 ? ":0" : ":") + MM + (ss < 10 ? ":0" : ":") + ss + ":" + mm;
};