Passing calculated date from SQL Agent job to SSIS package

  • I'm running into a problem trying to pass a calculated date field from a sql job to SSIS

    I've set the \Package.Variables[User::vareffectivedate].Value = "dateadd(dd, 1,GETDATE()),110" (tried with and without single and double-quotes)

    When the date passes to the SSIS package, it's read as a literal (I display variable and value in me error email)

    Line from email showing variable and value: Effective Date: dateadd(dd, 1,GETDATE()),110

    Command line looks like:

    /SQL "\Rx\MedcoRxEligWeekly" /SERVER SIERRA /CHECKPOINTING OFF /SET "\Package.Variables[User::vargroupno].Value";CA000114 /SET "\Package.Variables[User::vareffectivedate].Value";"""dateadd(dd, 1,GETDATE()),110""" /SET "\Package.Variables[User::vartermcutoff].Value";"""dateadd(dd, 1,GETDATE()),110""" /SET "\Package.Variables[User::varbentype1].Value";X /REPORTING E

    How can I get the package to see this as a calculated field?

    Thanks!

  • Found workaround...

    Instead of trying to pass the calculation, I passed the #days to be used in the calc and then performed the calc in the SSIS package and it works.

    Thanks anyway!

  • Yes! I tried passing a date value in from an XML configuration file and struggled with it for quite some time. Passing an offset value as an integer and using that integer in an expression on my run date parameters works perfectly.

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

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