Start New Discussion within our Databases Community

Hi all,

I am attempting to rename a file using the File System Task Editor in SSIS. In the Expression Builder, I have


but it returns the following error:

TITLE: Expression Builder

Expression cannot be evaluated.


The data types "DT_I4" and "DT_WSTR" are incompatible for binary operator "+". The operand types could not be implicitly cast into compatible types for the operation. To perform this operation, one or both operands need to be explicitly cast with a cast operator.

Attempt to set the result type of binary operation "@[User::fileName] + (DT_WSTR,2)DATEPART("mm",GETDATE())" failed with error code 0xC0047080.

Can someone please tell me what I am doing wrong?

I took a completely different approach to this and am using Package Variables within the File System Task Editor.

This question has already been answered. Start a new discussion instead.