wiki:tipps_und_tricks:mit_datum_rechnen

Dies ist eine alte Version des Dokuments!


barcode

Wie kann man mit dem Datum rechnen?

Hier einige Beispiele

date -d "2010-02-04 11:00:00 20 minutes ago" '+%Y-%m-%d %H:%M:%S'
date -d "2010-02-04 11:00:00 120 hours ago" '+%Y-%m-%d %H:%M:%S'
date -d "2010-02-04 11:00:00 120 days ago" '+%Y-%m-%d %H:%M:%S'
date -d "2010-02-04 11:00:00 3 months ago" '+%Y-%m-%d %H:%M:%S'
date -d "2010-02-04 11:00:00 30 years ago" '+%Y-%m-%d %H:%M:%S'
date -d "last month" +%m
date -d "2 month ago" +%b
date -d "-2 month" +%B
date -d "-1 hours" +%H
date -d "tomorrow"
date -d "yesterday" +"%d %B %y"
date -d "last week" +%a
Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   __ __  __  __   ____   ____   ____
  / //_/ / / / /  / __/  / __/  / __/
 / ,<   / /_/ /  / _/   / _/   / _/  
/_/|_|  \____/  /_/    /___/  /___/
 
  • wiki/tipps_und_tricks/mit_datum_rechnen.1353339471.txt.gz
  • Zuletzt geändert: 2012/11/19 16:37
  • von wikiadmin