I'm using an Excute SQL Task in order to insert a value into my table. One of the columns are a date type. The sql source type is a variable called insertCommand.
Here is my insertCommand expression: "insert into myTable VALUES (" + @[User::nameOfFile] + "," + GETDATE() + ")"
I get the error: The data types "DT_WSTR" and "DT_DBTIMESTAMP" are incompatible for binary operator "+".
Now I understand that the error is coming from using GETDATE() and I know that I can cast it to DT_WSTR but this column's data type is DATE not NVARCHAR. How can I insert it as a date?