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

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Date output a day befo...
Copilot Studio
Unanswered

Date output a day before the chosen date from Adaptive Card form

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

Hi there,

 

I have seen other similar threads about the date conversion and seems like there is something weird going on around.

 

On my PVA my adaptive card has a formula to convert string to date which is : 

Text(Topic.PurchaseDate)
 
On my Power Automate flow I have the following set up:
2023-08-08 13.43.28 make.powerautomate.com b4becfdc68b0.png

Where the Compose 2 set up is: 

formatDateTime(outputs('Compose'),'dd/MM/yyyy''en-GB')
 
Even so, my output date is always a day before the chosen date from the Adaptive Card form.
 
If I choose the date to 01/08/2023
The output that comes through is:
fernandosilva_0-1691510363146.png

 

 

Any help will be appreciated.
 
Kind regards,

Fernando
Categories:
I have the same question (0)
  • MattJimison Profile Picture
    577 Most Valuable Professional on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Hi, @fernandosilva 

     

    I would drop the second argument in your formatDateTime since you're already getting it in the format you want, and because differences between time zones could be causing the issue with dates not matching.

     

    Change from:

    formatDateTime(outputs('Compose'),'dd/MM/yyyy''en-GB')

     

    To:

    formatDateTime(outputs('Compose'),'dd/MM/yyyy')

     


    Find this post helpful? Please mark it as the solution and/or provide kudos so that it will help others in the future.

    Cheers,
    Matt

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Hi @MattJimison ,

     

    Thank you for your reply.

     

    It doesn't matter if I drop the second argument or not, the date is still showing as one day before the day I chose from the dropdown calendar in the form.

     

    There was no error on the classic PVA version about it and all was working as intended, so now with the new version comes all the new issues and bugs to be sorted.

     

    Anyone from Microsoft to have a look at this issue please?

     

    @HenryJammes

     

  • MattJimison Profile Picture
    577 Most Valuable Professional on at
    Re: Date output a day before the chosen date from Adaptive Card form

    @fernandosilva 

     

    try:

     

    addHours(variables('YourDate'),1,'dd/MM/yyyy')

     

    I'm wondering if your date doesn't have any time on it, which would make it midnight, and Daylight savings time is throwing it off by moving the time an hour back. This would move it an hour up to avoid that.

     

    Also, if this doesn't work, can you please show the incoming value from PVA into your Flow? When I create a quick adaptive card with just a date picker, and use that variable, my value looks like this coming into Flow (in my case I'm only getting the date, no time, but when I try and recreate the issue with this kind of value, I'm unable to get the day before, and in the below example, the date I picked in the calendar control was August 14, 2023)

    MattJimison_0-1692060953349.png

     

     

     


    Find this post helpful? Please mark it as the solution and/or provide kudos so that it will help others in the future.
    Cheers,
    Matt

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Hi @MattJimison ,

     

    I won't need time with my date i'm afraid.

     

    My input date can be seen here:

    2023-08-15 09.53.23 web.powerva.microsoft.com 2b6ac25cda73.png

    It's a date picker from adaptive cards and on PVA classic mode works perfectly fine, but not on the new canvas, which is kinda mess up and cool at the same time.

     

    Anyway, the data from the form is sent by email and the date always come a day earlier with the new canvas.

     

    I believe no one until now has come with a solution and I tried a million ways to do it, but seems like another bug in the system.

     

    Cheers,


    Fernando

  • MattJimison Profile Picture
    577 Most Valuable Professional on at
    Re: Date output a day before the chosen date from Adaptive Card form

    @fernandosilva  can you show the value in power automate, not in the PVA form? I want to see what value power automate is getting. 

     

    Also, did the hour trick work? That won’t add time to your date because it still outputs only a dd/MM/yyyy format - it’s just to ensure daylight savings doesn’t cause it to fall back when the date is parsed.

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Hi @MattJimison,

     

    See below the value from the PA flow:

    2023-08-16 09.48.58 make.powerautomate.com af16eeaeae9a.png

     

    See below the date picked from the date picker:

    2023-08-16 09.48.20 web.powerva.microsoft.com 45e174278259.png

     

    I tried the hour trick and didn't make a difference.

     

    Big bug here.... 😕

  • MattJimison Profile Picture
    577 Most Valuable Professional on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Thanks. This helps confirm the issue isn’t on the Power Automate side and I would agree it looks like a bug since the date picker value from PVA isn’t what is getting sent. I’d suggest filing a ticket with Microsoft; you could temporarily add a day in Power Automate to the value but once the bug is resolved you’d have to undo that “fix.”

  • Ricardo_Kerr Profile Picture
    2 on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Defina na função o utcNow() para seu fuso-horário. Eu estou no Brasil e meu utc -3h.

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Hi @Ricardo_Kerr ,

     

    Can you post an example of the function, so the community can benefit of the solution you found?

     

    Cheers,

     

    Fernando

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at
    Re: Date output a day before the chosen date from Adaptive Card form

    Hi all,

     

    A trick solution for the matter has been found. For now.

    Instead of changing the formatDate on the second Compose component (ComposeOutput), place the following formula:  addDays(outputs('Compose'),1,'dd/MM/yyyy').

    2023-10-09 14.14.02 make.powerautomate.com 393a6103b7c4.png

    This formula will add 1 day from the output of the first Compose component, so when the date is sent through the email, it will be exact date the user chose from the date picker and not one day before as it stands without the formula.

     

    Any more info, please let me know.

     

    Kind regards,

     

    Fernando

     

     

     

     

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 > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 265 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 257 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 84 Super User 2025 Season 2

Last 30 days Overall leaderboard