The data type of the variable should be integer.
Make sure you select single row result set in the Execute SQL Task.
If you want it as a date, I would cast it in the SQL query itself.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP