Hi Team,
I have a requirement in which i want to show only month and year in drop down. how to achieve this?
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
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
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.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473