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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Date from Email to SP ...
Power Automate
Unanswered

Date from Email to SP via Flow

(0) ShareShare
ReportReport
Posted on by 60

So I get an email that I suck into my flow using HTML to Text.   I pull out the date from this line :

Renewal Date: 30-09-2020 10:01  (so I end up with 30-09-2020 10:01).  Can someone please tell me how I can get this into SharePoint?  Whenever I try and handle the date in Flow it mentions wrong format/UTC etc...and "The datetime string must match ISO 8601 format.'  Help appreciated please.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Taylope1 

     

    Use expression formatDateTime to convert the value to yyy-MM-dd hh:mm format. Then map the formatted value to SharePoint.

     

    Thanks

  • Rahber Profile Picture
    1,935 on at

    the ISO 8601 format is

    YYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)

    So your dates should look like either of the below format

    2020-09-30T10:01+0:00

    09/30/2019 10:01:00

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,

    Rahber

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @Taylope1,

     

    I tried formatDateTime() function to convert your timestamp into one could be used in SharePoint, but it not ISO 8601 format, so it failed. 

    As a workaround, you could break the timestamp and re-collage by using split() function, for example:

    1. Use split(outputs('Compose'),' ') could divide the timestamp into date and time (30-09-2020 and 10:01)

    2. Use split(split(outputs('Compose'),' ')[0],'-') could divide the date into day, month and year (30, 09 and 2020)

    3. Then re-collage them inorder, yyyy-MM-dd hh:ss

    Annotation 2020-07-01 100819.jpg

     

    You could create a simple flow as below, and copy the following code and paste it into Compose2 action to have a try:

     

    @{split(split(outputs('Compose'),' ')[0],'-')[2]}-@{split(split(outputs('Compose'),' ')[0],'-')[1]}-@{split(split(outputs('Compose'),' ')[0],'-')[0]} @{split(outputs('Compose'),' ')[1]}

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard