Search code examples
azure-devopsazure-data-factorydataflow

How to filter timestamp column in Data Flow of Azure Data Factory


I have timestamp column where I have written following expression to filter the column:

contact_date  >= toTimestamp('2020-01-01') && 
contact_date  <= toTimestamp('2020-12-31')

It doesn't complain about syntax but after run it doesn't filter based on date specified. Simply to say logic doesn't work. Any idea?

Date Column in Dataset:

enter image description here


Solution

  • Please don't use toTimestamp() function. I tested and you will get null output.

    I use a Filter active to filter the data. Please use the toString() and change the expression like bellow:

    toString({contact_date })>= toString('2020-01-01') && toString({contact_date })<= toString('2020-12-31')
    

    Ref my example, contact_date and output: enter image description here

    enter image description here