Update String field with value of utcNow()

iamSara 1 Reputation point


I have a text field called LastRun in a SharePoint list which I need to update it with the value of utcNow() in the format of yyyy-MM-ddThh:mm:ss:00Z

in my logic apps workflow I have a variable which is set to utcNow() and it returns date/time in the exact format that I want:

but when I update the item the value changes to the yyyy/mm/dd hh:mm:ss format:

I'm not sure what I'm missing here!

Any help would be appreciated.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,939 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kamlesh Kumar 3,861 Reputation points

    Hi @iamSara-3391 ,

    Welcome to Microsoft Q&A Platform. Thank you for the question.

    You can use the formatDateTime function to keep the expected format and it should work. I used the below expression to check the format.


    Hope this helped you,


    Kamlesh Kumar

    Please don't forget to click on 205836-130616-image.png or upvote 205759-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