SSIS pkg variable not resolving to datetime

  • My SSIS pkg requires a SQL SELECT against a table to select qualified rows based on a date.

    The parameter passed from DTEXEC is CHAR(8) format YYYYMMDD (eg. 20090729) and is then stored in SSIS pkg variable pDATE

    My SSIS Data Flow data source (a SQL table) needs to extract all rows from the table where table_date_column = pDATE

    The SSIS pkg is failing because it is not converting the CHAR(8) format to datetime format.

    This SQL will perform the conversion: SELECT convert(datetime, '20090729', 112)

    Question is: How do I get the CHAR(8) variable, passed in from the DTEXEC, converted to a DATETIME to be used in my data source SQL selection criteria

    BT
  • couldn't you just read in that input, then pass your data through a derived column flow, and use the cast operations to convert your data?

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

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