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(1731079147000);
console.log(ts.toDateString());
# Fri Nov 8 2024
toISOString()
You can learn more about toISOString
in documentation.
var ts = new Date(1731079147 * 1000);
console.log(ts.toISOString());
# %2024-11-08T16:19:07+01:00
Other Functions
var ts = new Date(1731079147000);
Tags
Related Articles
- How To Convert Timestamp To Date and Time in Python
- How To Get Current Date And Time in JavaScript
- How To Get Current Timestamp In JavaScript
- Timestamp To Date
- How To Get Current Time In Python
- How To Get Current Timestamp In Bash
- How To Get Current Timestamp In Java
- How To Get Current Timestamp In PHP
- How To Get Current Timestamp In Python