Timestamp To Date Converter
Convert timestamp to date or date to timestamp easily
How To Get Current Timestamp In Bash
Bash (linux command line language) provides single command for converting and retrieving dates and times. This command is date
.
How To Get Timestamp In Seconds
To get timestamp in seconds you have to use format options and specify, that you want to get timestamp in seconds seconds since 1970-01-01 00:00:00 UTC.
date +"%s"
# 1733062236
How To Get Timestamp In Milliseconds
There is no direct way how to get timestamp in milliseconds. We have to combine multiple commands. First get current timestamp with nanoseconds, and then convert it to milliseconds.
echo '('`date +"%s.%N"` ' * 1000000)/1' | bc
# 1733062236
Tags
Related Articles
- How To Get Current Timestamp In Java
- How To Get Current Timestamp In JavaScript
- How To Get Current Timestamp In PHP
- How To Get Current Timestamp In Python
- How To Convert Timestamp To Date and Time in JavaScript
- How To Convert Timestamp To Date and Time in Python
- How To Get Current Date And Time in JavaScript
- How To Get Current Time In Python