jollyroger
Technical User
Hello there
I am sure my problem is a common one, but I cannot find any reference to it within my OS (I was going to shell script it but....)
I have an SQLPLUS Script which would be called up from the command line / cron. This script will accept parameters and those will need to be in a set format.
Now the question is this. Today's date is easy, even yesterdays (as I have another script which records this in a file), but 7 days ago in the format DD-MON-YY?
What I need is the ability to:
Convert 05-OCT-03 to a number (Julian?)
Minus the number of days I want e.g. 7
Convert the resulting number back to the above format for a date. e.g. 28-SEP-03
Any idea's???
Best regards
Ben
I am sure my problem is a common one, but I cannot find any reference to it within my OS (I was going to shell script it but....)
I have an SQLPLUS Script which would be called up from the command line / cron. This script will accept parameters and those will need to be in a set format.
Now the question is this. Today's date is easy, even yesterdays (as I have another script which records this in a file), but 7 days ago in the format DD-MON-YY?
What I need is the ability to:
Convert 05-OCT-03 to a number (Julian?)
Minus the number of days I want e.g. 7
Convert the resulting number back to the above format for a date. e.g. 28-SEP-03
Any idea's???
Best regards
Ben