ADF expression for date time format 2021-11-01 06:00

AP 156 Reputation points
2021-12-10T05:09:57.98+00:00

Hi Can you please let me know how to get the expression done in ADF pipeline to get the date time format in '2021-11-01 06:00' format.

And also to get previous date with same format please.

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

3 answers

Sort by: Most helpful
  1. Nandan Hegde 32,416 Reputation points MVP
    2021-12-10T06:04:54.377+00:00

    Hey,
    The below link can help you :
    https://azurelib.com/datetime-conversions-in-azure-data-factory/

    You can even use the combination of above function and concat as well.

    And for prevent date, use dateadd function


  2. AP 156 Reputation points
    2021-12-14T03:05:37.903+00:00

    Hi, Thank you for the links.

    I am having trouble concating variables into this query. Please help

    SELECT '411D2DF4-0E28-488B-A95D-ghjkhjkhjkhjkjk' as Site,Periodendtime as utcSampledatetime,Periodendtime as Sampledatetime, [test.test.test] as Feed, [test.test.test] as Prim_Prod,[test.test.test] as Sec_Prod
    from
    (SELECT PeriodEndTime, sourcefqn, quantity
    from [testExt].[dbo].fn_test_Movements_GetFiltered
    where SourceFQN in ('test.test.test.test', 'test.test.test.test', 'test.test.test')) AS X
    PIVOT (MAX(QUANTITY) FOR sourcefqn IN ([test.test.test], [test.test.test1],[test.test.test2])) AS PIV

    0 comments No comments

  3. AP 156 Reputation points
    2021-12-14T06:00:56.743+00:00

    Click to vote
    0 Votes"
    0

    AP-9104 answered · 2 hours ago

    Hi, Thank you for the links.

    I am having trouble concating variables into this query. Please help

    SELECT '411D2DF4-0E28-488B-A95D-ghjkhjkhjkhjkjk' as Site,Periodendtime as utcSampledatetime,Periodendtime as Sampledatetime, [test.test.test] as Feed, [test.test.test] as Prim_Prod,[test.test.test] as Sec_Prod
    from
    (SELECT PeriodEndTime, sourcefqn, quantity
    from [testExt].[dbo].fn_test_Movements_GetFiltered
    where SourceFQN in ('test.test.test.test', 'test.test.test.test', 'test.test.test')) AS X
    PIVOT (MAX(QUANTITY) FOR sourcefqn IN ([test.test.test], [test.test.test1],[test.test.test2])) AS PIV

    0 comments No comments

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.