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 / Problem with date form...
Power Automate
Answered

Problem with date formation

(0) ShareShare
ReportReport
Posted on by 124

Hi,

 

I'm trying to create All day events in a calendar with Create Event (V4) and the format it wants is "yyyy-MM-ddThh:mm:ss" 

2020-04-23 14_03_49-Edit your flow _ Power Automate.png

 

I've been trying to format the date but I'm unsuccessful.

I've been trying:

  • @formatdatetimetriggerBody()?['FromDate'],'yyyy-MM-ddThh:mm:ss')
  • formatdatetime(triggerBody()?['FromDate'],'yyyy-MM-ddThh:mm:ss')
  • "@formatdatetime(triggerBody()?['FromDate'],'yyyy-MM-ddThh:mm:ss')"
  • "formatdatetime(triggerBody()?['FromDate'],'yyyy-MM-ddThh:mm:ss')"
  • @formatdatetime(outputs['FromDate'],'yyyy-MM-ddThh:mm:ss')

 

This is how it's now:

2020-04-23 15_13_28-Edit your flow _ Power Automate.png

And the result is:

2020-04-23 15_13_20-Run History _ Power Automate.png

 

Is my formatting wrong or do I need to use "addMinutes" or something?

Or perhaps both?

 

Thank you!

Categories:
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    hi pleasee @ZowieS  see this, you need to change in expressions part, to add the fuction.

     

    ex.PNG

  • MJain Profile Picture
    2,450 on at

    Hi @ZowieS ,

     

    use your formula in expression part. Capture.JPG

  • ZowieS Profile Picture
    124 on at

    Hi @ManishJain and @ChristianAbata,

     

    Thank you for your help!

     

    I've tried that but that didn't work.

     

    The Expression is: formatdatetime(triggerBody()?['FromDate'],'yyyy-MM-ddThh:mm:ss')

    2020-04-23 18_28_59-Edit your flow _ Power Automate.png

    And the result was:

    2020-04-23 18_26_01-Run History _ Power Automate.png

     

     

    Also, the FromDate is from a Sharepoint list and the column typ is Date and Time:

    2020-04-23 18_31_55-Window.png

  • RobElliott Profile Picture
    10,543 Super User 2026 Season 2 on at

    @ZowieS one thing to remember is that the case inside the expression needs to be correct. You've got formatdatetime all in lower case whereas it should be formatDateTime.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • ZowieS Profile Picture
    124 on at

    Hi @RobElliott,

     

    Ah, didn't know it was case sensitive in the Expression.

    But sadly it still didn't work 

    2020-04-23 19_01_59-Run History _ Power Automate.png

     

    Do I need to convert the date to string first and then convert it back to date for the Create Event (V4)?

  • Verified answer
    ZowieS Profile Picture
    124 on at

    Hi,

     

    I've solved it. 😁

    I didn't know that you need/could to go back and fourth between Dynamic content and Expression. 

    So I did as in this video but with Compose.

     

    Thank you for you help @RobElliott, @ManishJain & @ChristianAbata!

     

    The solution:

    Expression: 

    formatDateTime(outputs('Create_item_from_the_MS_Form_response')?['body/FromDate'],'yyyy-MM-ddThh:mm:ss')

    2020-04-23 19_32_14-Edit your flow _ Power Automate.png

     

    2020-04-23 19_32_47-Run History _ Power Automate.png

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
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard