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!

Arithmetric on a Date String

Status
Not open for further replies.

app4dxh

Programmer
Oct 17, 2001
1
US
I will need to include a process (function) in a Korn Shell that will receive in a date string with the format:
YYYYMMDD.
I then need to subtract 7, to get the previous weeks date. This is probalbly really easy, but for the life of me, I can't figure out where to start.
I'm thinking the date needs to be converted to a Julian, then subtract 7 and convert back to a string.
My company does not support Perl, so that's out.
Any help would be appreciated!
:)
Thanks
 
Check thread60-141162 for a good method suggested by csfalmeida.
CaKiwi
 
also have a look at faq80-953 as there's a korn shell solution there now as well as the original perl trick Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top