datetime format - visual expression builder - data flow

arkiboys 9,706 Reputation points
2021-10-04T11:23:22.227+00:00

If I use currenttimestamp I get the time one hour behind
In standard expression the floowing works to get the correct time
convertTimeZone(utcnow(),'UTC','GMT Standard Time')
However, it does not get recognised in visual expression builder

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

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2021-10-05T04:21:47.567+00:00

    Hi @arkiboys ,

    Thank you for posting query on Microsoft Q&A Platform.

    currentTimestamp() - Gets the current timestamp when the job starts to run with local time zone.

    When we say local time zone, that means time zone of spark cluster which will be used by ADF to run your dataflow.

    When you say standard expression, I assume you mean pipeline expression(correct me if i am wrong).

    convertTimeZone() - Convert a timestamp from the source time zone to the target time zone.

    Since, currentTimestamp() not guarantees it returns UTC, better to use currentUTC() function in data flows.

    currentUTC() the current timestamp as UTC. If you want your current time to be interpreted in a different timezone than your cluster time zone, you can pass an optional timezone in the form of 'GMT', 'PST', 'UTC', 'America/Cayman'. It is defaulted to the current timezone. Refer Java's SimpleDateFormat class for available formats. https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html. To convert the UTC time to a different timezone use fromUTC().

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful

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.