I have below code which is not working in ADF.
Are there any alternative functions to get difference between two dates.
Below is my code:
DATEDIFF("DD",START_DATE,END_DATE)<=10
Can someone please check and advise me how to proceed with this.
I have below code which is not working in ADF.
Are there any alternative functions to get difference between two dates.
Below is my code:
DATEDIFF("DD",START_DATE,END_DATE)<=10
Can someone please check and advise me how to proceed with this.
2
Answers
for day difference :
We would convert the Date to the Tick values and take a difference of the Tick values, post which would convert the Tick to the corresponding Day conversion value.
@div(sub(variables(‘Tick2’),variables(‘Tick1’)),variables(‘Day’))
The below blogs explain the same:
https://www.c-sharpcorner.com/article/implementing-datediff-function-in-data-factory-synapse-via-pipeline-expression/
https://datasharkx.wordpress.com/2023/09/25/implementing-datediff-function-in-data-factory-synapse-via-pipeline-expressions/
Try using tick function which return the ticks property value for a specified timestamp. A tick is a 100-nanosecond interval.