Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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.

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Date from Email to SP via Flow

    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.

  • Rahber Profile Picture
    1,935 on at
    Re: Date from Email to SP via Flow

    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

  • abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: Date from Email to SP via Flow

    Hi @Taylope1 

     

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

     

    Thanks

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1