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 Apps / Exctract month name fr...
Power Apps
Answered

Exctract month name from date field in powerapps

(1) ShareShare
ReportReport
Posted on by 257

Please I have a month field which I need it to trigger date field and filled automatically, I used this formula but it is not working, any suggestion how to solve this:

 

Spoiler (Highlight to read)
= VALUE( MONTH_DataCard3( [Date_DataCard1] ))
= VALUE( MONTH_DataCard3( [Date_DataCard1] ))
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @gme-eg 

     

    To extract the month name from a date type field, you can use the expression as:

    If the date is shown on a edit form having the control Date_DataCard1, then use the expression:
    Text(Date_DataCard1.SelectedDate,"mmmm")

    If you want to retrieve directly from the datasource you can use the expression as:
    Text(ThisItem.DateColumnName,"mmmm") -> If inside a gallery or edit form.

    Text(LookUp(DataSourceName, Col1 = "Value1").DateColumnName,"mmmm") -> If you want to extract it from the record directly.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Ghada Mehrez Profile Picture
    257 on at

    @yashag2255  Thanks a lot I tried but it is not working could you advise what is missing here:

     

    Extract Month Name.png

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @gme-eg 

     

    The issue here is that you are trying to reference the datacard instead of the date picker control. Follow the below steps:

    1) Select the date picker inside the datacard and note down the name of control, which is something like: DataCardValue12

    2) Pass this control inside the formula

    Text(DataCardValue12.SelectedDate,"mmmm")

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Ghada Mehrez Profile Picture
    257 on at

    @yashag2255  thanks a lot that's exactly what I need but the formula is not working please see below.

     

    Datacard 7.png

  • Nhelgren Profile Picture
    on at

    Try this:

     

    Text(DateTimeValue(Parent.Default), "[$-en-US]mmmm")

     

    You can also substitute your data source for Parent.Default

  • Ghada Mehrez Profile Picture
    257 on at

    unfortunately this is not working, thanks

  • Nhelgren Profile Picture
    on at

    I think I see the problem now. You're trying to take a date selected on a page that hasn't been committed and then use that value to drive the behavior of another field to display the month, is that correct?

     

    I tried to replicate your config as best I can. Date1 is a datetime dropdown I can populate. Date2 is going to display the month name. 

     

    in Date2 I set:

    DefaultDate to <datevalue on date1>.selecteddate (for you I think this is datacardvalue7.selecteddate)

    then I set format to "mmmm"

    month test.jpg

     

     
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @gme-eg 

     

    You are seeing this error because Combobox expects its DefaultSelectedItems to be an array but in this case you are passing a text. This error can be removed using:
     
    [Text(DataCardValue7.SelectedDate,"mmmm")]
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Ghada Mehrez Profile Picture
    257 on at

    @yashag2255  thanks a lot it works pretty good

  • PrachiM Profile Picture
    23 on at

    Please try the code:

    Text(DateValue(<DateControl>),"mmmm")

    This will first convert to Date Format, then extract only month from the Date.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard