Hello Angelo Mariano,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are in need of how you can format a timestamp to current millis In Azure Data Factory.
@Ganesh Gurram explains how to compute the current time in milliseconds since the Unix epoch by using ADF expressions. Should there be need for more clarification and explicitly includes handling for @pipeline().TriggerTime, here you go:
To compute the current time in milliseconds since the Unix epoch (current millis
) in Azure Data Factory, you can use the following expression:
- Using utcNow():
@div(sub(ticks(utcNow()), ticks('1970-01-01T00:00:00Z')), 10000)
- Using @pipeline().TriggerTime:
@div(sub(ticks(pipeline().TriggerTime), ticks('1970-01-01T00:00:00Z')), 10000)
// Convert the trigger time to ticks
@ticks(pipeline().TriggerTime)
// Convert ticks to milliseconds
@div(ticks(pipeline().TriggerTime), 10000)
// Combine the steps into a single expression
@div(ticks(pipeline().TriggerTime), 10000)
Those expressions will give you the current time in milliseconds, which you can use for your API query.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.