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 / How to extract Year an...
Power Automate
Unanswered

How to extract Year and Month values from Date field in share point list

(0) ShareShare
ReportReport
Posted on by 257

Now I have a flow that syncs any new office outlook events to a SharePoint list

In the list, I have the Month and Year columns(Single text type) I would like to make them get the Year and Month values from the start date column.

I inserted Apply to each step >> Compose for Year Expression>> Compose for Moth expression  as below but I got error when I run the flow.

formatDateTime(triggerOutputs()?['body/start'],'MMMM')
formatDateTime(triggerOutputs()?['body/start'],'yyyy')

 

 2021-04-08 12_54_07-Inbox - ghada.mehrez@flsmidth.com - Outlook.png2021-04-08 12_53_15-Inbox - ghada.mehrez@flsmidth.com - Outlook.png

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @gme-eg ,

    the error tells you that the

    triggerOutputs()?['body/start']

     is empty (= null). It's either empty or you're not using the proper dynamic content.

  • Mari Profile Picture
    on at

    Hello @gme-eg 

    Based on the screenshots and the explanation you shared, the Date value comes from the Get events (V4) action, so your expression should not use triggerOutputs(). Instead, you could use this in the Compose: 

     

    formatDateTime(items('Apply_to_each')?['start'],'MMMM')

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard