Problem: I'm trying to format the date (from "Dynamic Content" )I'm inserting into an email to the US friendly pattern mm-dd-yyyy. I'm using THIS solution posted here earlier. Everything in this solution seems to be working fine except in the email where I place the variable that is set to the date from the column... it shows that date 6 - 7 months in the future. This happens whether I modify the date pattern with the expression or not.
Background: I have a SharePoint list with columns of people and dates. Everyday the Flow pulls the list and compares that date with today's date to see if dates in the columns are 30 day or less from today, which all works fine. It's just when the date get inserted into the email body the variable date is 6 - 7 months ahead.
Couple of things to check.
1. Format of the date expression. Could you post the expression. The screenshot is not very clear.
2. Run time history values of the date returned from Get Items Step before you format or store in a variable name.
This is strange indeed, but clearly an issue in converting the date.. When you run the Power Automate what's the format you see when it's inserted in the varDate? And when it comes from the Get Items?
You may encounter issues if the date is formatted in another format and is returned in a string format and the mapping get's screwed-up.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
I downloaded the raw JSON (or whatever it is) from the Get Items test run. This what I see for the date column I'm putting into the variable and that I want to show in my email:
Watch Microsoft Business Applications Summit sessions on-demand.
The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications