wiki:tipps_und_tricks:mit_datum_rechnen

Dies ist eine alte Version des Dokuments!


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.1353339415.txt.gz
  • Zuletzt geändert: 2012/11/19 16:36
  • von wikiadmin