What will be the required value in the additional expression? It returns an error saying "conversion failed when converting date or time from character string.

NIKITA SHARMA 1 Reputation point
2020-06-25T08:28:49.873+00:00

10646-error.jpg

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,814 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MartinJaffer-MSFT 26,091 Reputation points
    2020-06-26T20:40:37.587+00:00

    Hello and thank you or your question. Before I can talk about the answer, there are a couple points I would like to make.

    I can see, in your query you use
    ... '@activity('Lookup1').output' as datetime2)

    You probably want to use something like
    ...'@{activity('Lookup1').output.value}' as datetime2)

    There are two changes here.
    { ... } the curly braces help tell data factory where the expression begins and ends, also converts to string. Without this it might consider the ' as datetime2) as part of the expression.
    ...output.value selects the data returned by the lookup. Without the .value part, you can get a complex JSON object with more info about the activity execution. You may need to also add the column name ...output.value.dateColumnName .

    Next I would like to show you how to see what the value should be.

    There is a way you can debug run the lookup without running the copy activity. There is a red circle. Click it, and when filled, will act as a breakpoint. Doing a debug run like this will let you see what the output of the lookup activity is, and thus what the value you should use is.
    10823-breakpoint.jpg


Your answer

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