Share via

data flow expression

arkiboys 9,711 Reputation points
2021-11-09T12:17:36.52+00:00

data coming in is as yyyy-MM-dd

I'd like to have an expression where
if the date value < 2010-01-01 then leave as is
if the date value > 2010-01-01 then format it to dd/MM/yyyy

This is what I have but it gives null if the date > 2010-01-01

iif((toDate(toString(byName($0)),Config#lookup($0).SourceFormat)) < (toDate('2010-01-01')),toDate(toString($$)),toDate(toString(toTimestamp(toString(byName($0)), Config#lookup($0).SourceFormat) , 'dd/MM/yyyy')))

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

1 answer

Sort by: Most helpful
  1. MarkKromer-MSFT 5,231 Reputation points Microsoft Employee Moderator
    2021-11-09T16:30:03.167+00:00

    Try using $$ instead of $0

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.