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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Disparity between show...
Power Automate
Unanswered

Disparity between shown date and actual date

(0) ShareShare
ReportReport
Posted on by 33

Hello. Today I came onto an issue relating to dates.

 

I'm loading a dataverse table from an API. The date from the API comes as a string, like "yyyyMMdd", e.g "20221125".

I then slice that string 3 times and concatenate it to have the string "25/11/2022", and then use parseDateTime function to convert it to "date" data-type.

 

However, when that data is loaded onto the table I get an odd result as shown here:

Adehmar_6-1669411169399.png

As you can see, the date value shown in the table is offset by 1 day before. Instead of the correct "01/01/2021", I get "31/12/2020" shown, and a complete different format in the actual value. That happens to every date in every registry I load. So for example, "25/11/2022" is shown as "24/11/2022" and it's actual value is 2022-11-25T00:00:00Z".

 

This is undesirable as I have to filter some information within a date range and the results are all wrong.

Adehmar_1-1669409959521.png

This is information from the loaded table, they all should be "01/01/2021".

Adehmar_5-1669411071785.png

 

This is the expression used to parse the date. I think the error is here. I don't get anything else related to dates from the API other than that string.

 

Can someone help me figure it out? The steps I want are:

 

1. Get string in yyyyMMdd, e.g, "20221125",

2. Transform it to string "25/11/2022", and then parse that string into "date" format

3. Load it into an "date-only (no time)" data-type column. I don't care about time, just dd, MM and yyyy.

 

Up until step 2, it's done successfully. Input is the string, then expression converts it to the desired format:

Adehmar_4-1669410923775.png

So error must be on the parseDateTime previously mentioned or some other behavior I'm not aware of.

 

Thank you in advance.

Categories:
  • grantjenkins Profile Picture
    11,063 Moderator on at

    Can you try the following expression to convert your date string. I've put it into yyyy-MM-dd format and left it as the default time-zone as think this might be part of the issue with the difference in dates.

     

    parseDateTime(concat(slice(variables('date'), 0, 4), '-', slice(variables('date'), 4, 6), '-', slice(variables('date'), 6)))

     

    grantjenkins_0-1669433456390.png

     

  • Adehmar Profile Picture
    33 on at

    Unfortunately this doesn't work. It has the same result.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard