SSIS Expression Builder converting/casting a SQL column Data Type of Int to type: String & Date

  • Hi,

    I need help converting/casting a SQL column Data Type of Int to type: String  &  Date

    Does anyone have any examples, i need to do it via an expression.

    Regards,

  • Here's one I use to create a file name out of a DATEPART extraction:

    "\\\\server\\Shared\\dir\\IS\\BI\\LastOrderFiles\\" + "LastOrder" + (DT_WSTR, 2)  (DATEPART( "mi", GETDATE()  ) ) + ".xml"

    The "DATEPART" returns the minute (as an int) and I convert it using the (DT_WSTR, 2).

    I do this in an expression srtting a package variable.

    Hope this helps.

    Dan

  • Thank You, I used (DT_STR,8,1252)Run_DateFrom

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply