Date: Difference between revisions

From DWIKI
Line 23: Line 23:


== String to epoch ==
== String to epoch ==
  date -=data='Jul  3 09:48:30' +%s
  date --date='Jul  3 09:48:30' +%s


[[Category:Shell]
[[Category:Shell]

Revision as of 08:45, 3 October 2022

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

[[Category:Shell]