Ricardo Ferreira
Ricardo Ferreira

Reputation: 39

How get previous day in parameter in SSIS package

I have a package in SSIS when I have a start date with a parameter:

enter image description here

However I have a query then use that parameter, but I need to have de previous day here:

enter image description here

for exemple if start_date is '2022-03-03' I need to set up @SDATE to '2022-03-02'. Can anyone help me. Thanks

Upvotes: 0

Views: 114

Answers (1)

Amira Bedhiafi
Amira Bedhiafi

Reputation: 1

This will give the previous date of the date in question :

(DT_WSTR, 10) DATEADD("day",-1,start_date)

Upvotes: 1

Related Questions