Hi,
I need something like,
if the input date is 24/Aug/2008 and the inputvalue is +8 then the result should be 1/Sep/2008 (8 days after the input date)
if the input date is 24/Aug/2008 and the inputvalue is -8 then the result should be 16/Aug/2008 (8 days before the input date)
is there any command in unix,using which i can get this.Please guide me.
Its not helping as I don't have this version.
I tried something like this.
Code:
let noofdays=$1
let totaldays=24noofdays
DATE_STAMP=`TZ=CST-$totaldays date +%d/%b/%Y `
echo "$DATE_STAMP"
Its working fine.but when I tried to replace the current date with the given input date I am getting some error.
Code:
let noofdays=$1
let inputdate=$2
let totaldays=24noofdays
DATE_STAMP=`TZ=CST-$totaldays $inputdate `
echo "$DATE_STAMP"
input:
------
$1=2
$2=24/Jan/2008
error:
------
24/Jan/2008: No such file or directory
Why I am getting this error.how I can resolve this?any suggestion please..