Timestamp To Date Converter

Convert timestamp to date or date to timestamp easily

How To Convert Timestamp To Date and Time in JavaScript

Unlike other languages, JavaScript doesn't have equivalent for function strftime. Javascript however provides multiple functions to present date and time in human readable form. They are:

toDateString
Converts the date portion of a Date object into a readable string
toGMTString
Deprecated. Use the toUTCString() method instead
toISOString
Returns the date as a string, using the ISO standard
toJSON
Returns the date as a string, formatted as a JSON date
toLocaleDateString
Returns the date portion of a Date object as a string, using locale conventions
toLocaleTimeString
Returns the time portion of a Date object as a string, using locale conventions
toLocaleString
Converts a Date object to a string, using locale conventions
toString
Converts a Date object to a string
toTimeString
Converts the time portion of a Date object to a string
toUTCString()
Converts a Date object to a string, according to universal time

toDateString()

You can learn more about toDateString in documentation.


var ts = new Date(1730413410000);
console.log(ts.toDateString());
# Thu Oct 31 2024

toISOString()

You can learn more about toISOString in documentation.


var ts = new Date(1730413410 * 1000);
console.log(ts.toISOString());
# %2024-10-31T23:23:30+01:00

Other Functions


var ts = new Date(1730413410000);



This website uses cookies to ensure you get the best experience on our website. More info