(1) var timestamp = Date.parse(new Date()); (2) var timestamp = (new Date()).valueOf(); (3) var timestamp=(new Date()).getTime();