Skip to main content
Community site session details

Community site session details

Session Id : C2405mG01ZH/2nhwboDYsb
Power Apps - Building Power Apps
Unanswered

Show only month and year in dropdown instead of complete date

Like (0) ShareShare
ReportReport
Posted on 29 May 2024 14:06:03 by 158

Hi Team,

 

I have a requirement in which i want to show only month and year in drop down. how to achieve this?

ridhan_0-1716991539327.png

 

  • v-mengmli-msft Profile Picture
    on 30 May 2024 at 03:43:14
    Re: Show only month and year in dropdown instead of complete date

    Hi @ridhan ,

     

     

    What is the Items of your drop down?

    You can use Text function to convert your date column of Items.

    AddColumns(<formula on the Items>,"test",Text(DateColumn,"mmm yyyy"))

    Then change the value of drop down to test column.

     

     

    Best regards,

    Rimmon

  • VDI Profile Picture
    335 on 29 May 2024 at 14:46:29
    Re: Show only month and year in dropdown instead of complete date

    add below code on page load or on start - 

    Clear(colMonthYear);
    ForAll(
     Sequence(
     40,
     2022
     ) As Year,
     ForAll(
     Sequence(12),
     Collect(
     colMonthYear,
     {
     MonthYear: Concatenate(
     Last(
     FirstN(
     Calendar.MonthsShort(),
     Value
     )
     ).Value,
     " ",
     Year.Value
     )
     }
     )
     )
    );

    and on dropdown items property add collection - colMonthYear

  • arpost Profile Picture
    453 on 29 May 2024 at 14:15:12
    Re: Show only month and year in dropdown instead of complete date

    To achieve the date portion, you can use the Text() function and provide a format string for month (mmm for month abbreviation) and year (yyyy for full year):

     

    Text({DateValueHere}, "mmm yyyy") 

     

    Depending on from where you are getting your list of dates, you may want to use a solution such as AddColumns() to add the formatted text string as a new column to your list of dates so as to keep the actual dates under the hood (e.g., 4/1/22, 5/1/22, 6/1/22) as a reference point. 

     

    arpost_0-1716992095172.png

     

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete