Page 1 of 1

Variables

Posted: Wed Jul 14, 2010 2:03 pm
by MikeC
Hi,
I have a variable that is currently string data, but it's a 4 digit year (such as 1991). I need to convert it to something so I can subtract a year from it and put it in the report. For example:

The year that the variable is holding is 1991. I need to show the prior year (1990) in couple places in the report.

How to I convert the string data to something I can do a math calculation on in another variable?

Thanks

Variables

Posted: Thu Jul 15, 2010 4:16 am
by Ivan
Hello,

Please try to use the following expression:

Code: Select all

{int.Parse(your_variable) - 1}
Thank you.