Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cane I get a future date with date command?

Status
Not open for further replies.

pjb

Programmer
May 1, 2001
148
US
Is ther a way to return The date +7 days with the date command?
 
Try something like this:
Code:
TZ=X-168 date
Depending on your timezone, you may have to adjust 168 offset.
BTW, 168 = 7 * 24

Hope This Help
PH.
 
Thanks,
Taht'l do it. 163 works for eastern time
 
With GNU date command, you can easily works with dates.
In your case :

date --date='7 days'

Jean Pierre.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top