Loading time...

Epoch Converter

Bulk Converter

0 total • 0 valid • 0 errors

Code Examples

// Get current timestamp in seconds
const timestamp = Math.floor(Date.now() / 1000);
console.log(timestamp); // 1700000000

// Get current timestamp in milliseconds
const timestampMs = Date.now();
console.log(timestampMs); // 1700000000000

// Convert timestamp to Date
const date = new Date(timestamp * 1000);
console.log(date.toISOString());

Need examples in another language? Contribute on GitHub