cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GiovanniM
Helper I
Helper I

Problems in formatting data coming from Email

Hi,

 

I'm a complete beginner here, so please help with easy words 🙂

 

I've created a flow that once an email is received, trigger the creation of a task in Planner.

It works in its basic function

 

But now I'm trying to insert automatically the due date in the task as: Email received date + 7 days.

 

This is what I've tried to do:

 

GiovanniM_0-1669980492929.png

 

 

adddays(triggerBody()?['DateTimeReceived'],7,'dd-mm-yyyy')

 

Unfortunately the "time received" arrives with a wrong format, as you can see below. I've also tried to add a "compose" step but cannot understans in which format the date arrives...

 

Compose: formatdatetime(triggerBody()?['DateTimeReceived'],'dd/mm/yyyy')

 

GiovanniM_1-1669980594839.pngGiovanniM_2-1669980612568.png

 

 

 

Thanks a lot for your help

 

 

What to do next?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ajinder31
Continued Contributor
Continued Contributor

Hi @GiovanniM , Can you please give it a try without passing the format?

adddays(triggerBody()?['DateTimeReceived'],7)

OR 

adddays(triggerBody()?['DateTimeReceived'],7,'yyyy-MM-dd')


I haven't tried it on my side. Please let us know if it doesn't work.

--------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

View solution in original post

4 REPLIES 4
Ajinder31
Continued Contributor
Continued Contributor

Hi @GiovanniM , Please try with captial MM in format. mm represents minutes of recevied Date time.

adddays(triggerBody()?['DateTimeReceived'],7,'dd-MM-yyyy')


--------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks a lot! Almost solved, but still not able to insert it in the Task-Planner in the due date

 

GiovanniM_0-1669982238325.png

 

Ajinder31
Continued Contributor
Continued Contributor

Hi @GiovanniM , Can you please give it a try without passing the format?

adddays(triggerBody()?['DateTimeReceived'],7)

OR 

adddays(triggerBody()?['DateTimeReceived'],7,'yyyy-MM-dd')


I haven't tried it on my side. Please let us know if it doesn't work.

--------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Great, it worked

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,361)