Date/Time parts to variable as integer

Hi Guys,
i guess there is a several ways to grub the strings from date and time
like THISMONTH='/bin/date +%m'
but the hard part is to add or sub that string to a variable

i tried to use let command

TWOMONTHSAGO=$THISMONTH

declare -i TWOMONTHSAGO

let TWOMONTHSAGO-=2

but there are errors , syntax is wrong or it try to add string to integer...

i tried TWOMONTHSAGO = TWOMONTHSAGO-2
i'm a programmer but i'm not familiar with the bash script

can anybody help?

You're making it too hard.

The date command you have (assuming you have GNU coreutils and dateutils) will do some arithmetic for you

Start here: Time / Date Commands

Keep going! Be sure to read your info or man page for the date command.
Specifically the option:

   -d, --date=STRING
              display time described by STRING, not 'now'