Hi all,
I am attempting to rename a file using the File System Task Editor in SSIS. In the Expression Builder, I have
@[User::fileName]+(DT_WSTR,2)DATEPART("mm",GETDATE())+(DT_WSTR,4)DATEPART("yyyy",GETDATE())+".zip"
but it returns the following error:
TITLE: Expression BuilderExpression cannot be evaluated.ADDITIONAL INFORMATION:
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?