Safe
Safe

Reputation: 1

Is there a way to use if condition and todays date in the same expression

Need help translating this excel expression in to ssis: =IF(BA2="BAD",(TODAY()-BB2),0)

Upvotes: 0

Views: 197

Answers (1)

KeithL
KeithL

Reputation: 5594

Assuming derived column:

BA2=="BAD" ? (DT_DBDate)dateadd(day,-BB2,getdate()) : null(DT_DBDate)

This assumes you are subtracting a number of days. And I have no idea what 0 means in the false value. I chose null.

Upvotes: 1

Related Questions