Date: Difference between revisions

From DWIKI
(Created page with "=Links= *https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html =FAQ= ==Convert timestamp to readable== date -d '@1527153367'")
 
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Links=
=Links=
*https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html
*https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html
*https://linuxconfig.org/addition-and-subtraction-arithmetics-with-linux-date-command


=FAQ=


==Convert timestamp to readable==
= FAQ =
 
== Convert timestamp to readable ==
 
  date -d '@1527153367'
  date -d '@1527153367'
 
== Number of days to date ==
echo \(`date +%s -d 'Jul  3 09:48:30 2020 GMT'`-`date +%s`\)/86400|bc
     
== Now in epoch ==
date +%s
== String to epoch ==
date --date='Jul  3 09:48:30' +%s
[[Category:Shell]]

Latest revision as of 12:00, 4 October 2023

Links


FAQ

Convert timestamp to readable

date -d '@1527153367'

 

Number of days to date

echo \(`date +%s -d 'Jul  3 09:48:30 2020 GMT'`-`date +%s`\)/86400|bc
      


Now in epoch

date +%s

String to epoch

date --date='Jul  3 09:48:30' +%s