Convert String to date in ADF

Raja 81 Reputation points

Hello Team,
I am setting up a pipeline where I want to pull data from an external source using ADF pipeline.
I want to pull data of let's say yesterday nth day (today - n). So I have created a variable 'previousDay' using


The problem here is that, ADF doesnt allow to create Date variable/parameter ( so later I can use prevdate('dd') kind of function to access different fields of the Data variable).

Since the variable cannot be defined as 'Date' I am unable to use any date function. And if I define variable as String/Object, then there's no function to convert String to Date in the ADF UI.

could you please help here?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,087 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Suba Balaji 10,931 Reputation points

    Hi @Raja ,

    Thanks for posting your question on MS Q&A platform.

    Request you to kindly check this thread which discusses in similar lines (converting a string to date)

    Please revert in case you have further questions on it.

    thank you.