I have a package scoped variable which gets its value from an expression:
replace((DT_WSTR, 30)(DT_DBDATE)GETDATE() ,"-","")
I use this variable to pass the date (as a string) to a stored procedure.
The package is surrounded by a for-loop container so that it is always running (I use Konesans file watcher to trigger the package processing) It appears that the value being passed to the procedure is the date the package was started, not the current date. I had made the assumption that this would get validated at point of use: if I wanted to evaluate based on the package start date I would have used the relevant system variable.
Was my original assumption wrong, or do I need to look elsewhere. If it was wrong, then how do I get it to evaluate when it is called (I could put the calcuation into the execute sproc command but it gets used in loads of places, which is why the variable was a better choice)
BTW I can't use scripts to set variable values, I don't have a full copy of VS on my development machine.