Azure Data Factory - How to get time in epoch

Biju Mathew 481 Reputation points
2023-03-16T11:43:57.96+00:00

Hi

How do we get datetime in epoch in ADF please?

thanks

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

Accepted answer
  1. Subashri Vasudevan 11,231 Reputation points
    2023-03-17T16:16:23.9633333+00:00

    Hi,

    Did you get a chance to check the below page in SO?

    https://stackoverflow.com/questions/50322247/epoch-timestamp-in-data-factory

    You can declare a variable and use set variable activity in control flow to use the expression mentioned in above link.

    Please give it a try and, let us know how it goes

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Brett VanderPlaats 5 Reputation points
    2023-11-04T17:08:39.5333333+00:00

    toInteger(toLong(rtrim(toString((currentUTC('GMT'))-toTimestamp('1970-01-01T00:00:00','yyyy-MM-dd'T'HH:mm:ss', 'GMT')),'')) / 1000)

    1 person found this answer helpful.
    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.