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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date manipulation

Status
Not open for further replies.

trisco

MIS
Jan 3, 2001
44
US
I am running an RS/6000 and wish to code a script to perform date manipulation that will result in a mm/dd/yy date that is 3 days from today. Can anyone provide assistance to ease the pain of controlling the month and year in such a script? Are there easier ways than some form of table management?
Thanks.
 
Do you have access to Perl ? If so (it is on the AIX 4.3.3 CD's if not), do the following

1. perl -e 'printf %d\n",time'
2. Add 259200 to the result (3-days, in seconds)
3. perl -le &quot;print scalar locatime <nnn>&quot; where &quot;<nnn>&quot; is the resukt from step 2 above.

Regards, Bill
 
Thanks so much, Bill. I do have perl installed and will utilize the commands you provided. Thanks again.
Trisco.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top