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

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:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at
    Re: Problem with date formation

    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
    Re: Problem with date formation

    Hi @ZowieS ,

     

    use your formula in expression part. Capture.JPG

  • ZowieS Profile Picture
    124 on at
    Re: Problem with date formation

    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,313 Super User 2025 Season 2 on at
    Re: Problem with date formation

    @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
    Re: Problem with date formation

    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
    Re: Problem with date formation

    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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard