I have a variable called RouteCallerKeyDay and it takes a value such as '149421' which is calculated with the expression 148960 + DATEDIFF(dd, '2008-11-03 00:00:00', '2010-02-07 00:00:00') where 2010-02-07 00:00:00 is the import day I require.
The only way I have been able to assign it to my variable is if I run a script task with the following code in...
Dts.Variables("User::RouteCallerKeyDay").Value = CInt(148960 + DateDiff("d", "2008-11-03 00:00:00", Dts.Variables("User::DataImportDate").Value.ToString))
How do I set this up to work directly in the variables? I had to CInt() the whole value do I have to do something similar for the expression value?