Converting datediff to Azure Mapping Data flows expression language

Copper Contributor

I need to convert this sql snippet to Azure Data Flow expression language:

"case when Trans_StatusId <> 1 then 0 else datediff(day, AppliedDate, getdate()) end"

I tried "iif(Trans_StatusId != 1, 0, subDays(currentTimestamp(), toDate(AppliedDate)))"

but I am getting the error "subDays' expects 'integral' type of argument"

Converting AppliedDate to integer may be expected but it's not logical to convert a timestamp to and int.

0 Replies