web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How do I update a Data...
Power Automate
Unanswered

How do I update a Dataverse row with the current date?

(0) ShareShare
ReportReport
Posted on by 20
I have a Dataverse table which contains a Date column (date only). I want to use Power Automate to update this column with the current date (the date the workflow has run). This is in addition to some other updates to the rows.
 
I've tried a few different approaches:
 
1. utcNow() - if I use this directly in the 'Update a row...' action, it errors with The response is not in a JSON format. Example of output from utcNow() 2025-02-05T10:08:08.1505834Z
 
2. Using formatDateTime and parseDateTime combined with utcNow(). This errors with:
Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'json' parameter is not valid. The provided value '2025-02-05T09:58:38.3158496Z' cannot be parsed: 'Unexpected character encountered while parsing number: T. Path '', line 1, position 10.'. Please see https://aka.ms/logicexpressions#json for usage details.'.
 
3. Using the parse JSON action with utcNOW() as the input and the following schema (generated from sample payload):
{
  "type": "string"
}
When doing the above, I receive the following error message:
The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing number: T. Path '', line 1, position 10.'.
 
-
 
I'm still fairly new to Power Automate, so appreciate this might seem quite basic. Essentially, I want to be able to use the 'Update a row in selected environment' to update a table column (which is a date), to the date the workflow has run.
 
Thanks!
Categories:
I have the same question (0)
  • Verified answer
    Ravi-Prajapati Profile Picture
    416 Super User 2025 Season 2 on at

    You're encountering issues because Dataverse expects date values in a specific format (yyyy-MM-dd), whereas utcNow() and other expressions return a full DateTime string with timezone information.

    Here's a working approach using Power Automate to update the Date column correctly:


    Step-by-Step Solution

    1. Use utcNow() and Format the Date:

      • Add a Compose action before the Update a Row action.

      • In the Compose action, use this expression to format the current date correctly:

         
         
        formatDateTime(utcNow(), 'yyyy-MM-dd')

      This formats the date to 2025-02-05.

    2. Update the Date Column:

      • In the Update a Row action for Dataverse:
        • Set the Date column field to the output of the Compose action.

    Example Workflow

    1. Trigger: Based on your requirement (manual, recurrence, etc.).
    2. Actions:
      • Compose action:
         
         
        formatDateTime(utcNow(), 'yyyy-MM-dd')
      • Update a Row:
        • Set the Date column to the Compose output.

    Important Notes

    • Ensure the Date column in Dataverse is of type "Date Only."
    • You do not need to parse JSON for this simple use case.
    • formatDateTime() converts UTC DateTime to the required format without needing timezone handling.
  • h-demedici Profile Picture
    20 on at
    Thanks @CU04021533-0 for taking the time to respond. 
     
    I didn't realise, the problem was with the 'Update a row...' action. I had it within a 'For each' a to update multiple rows in Dataverse, but was using the 'Current item' from the 'For each' rather than the proper unique identifier for the table row. 
     
    I've also followed your guidance on formatting and using the date - that's worked perfectly. Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard