Scenario:
- Dropdown control
- Items property set to:
SortByColumns(
AddColumns(
Distinct(
colAllRecords,
PLN_STRT_DT
),
"planStartDateFormatted",
Text(Result, "[$-en-US]mm-dd-yyyy") //<---Formatting not being respected
),
"planStartDateFormatted",
Ascending
)
- Original PLN_STRT_DT is in ISO8601 datetime format ("2020-01-01T00:00:00Z")
- I'm trying to show a more user friendly format using ("01/01/2020")
- But the formatting is not being reflected in the Dropdown control
- Clearly seen here as well:
What am I missing?
Thank you
Solved! Go to Solution.
Looks like it is seeing it as text.
Try the following:
SortByColumns(
AddColumns(
Distinct(
colAllRecords,
PLN_STRT_DT
),
"planStartDateFormatted",
Text(DateTimeValue(Result), "[$-en-US]mm-dd-yyyy") //<---Formatting not being respected
),
"planStartDateFormatted",
Ascending
)
I hope this is helpful for you.
Looks like it is seeing it as text.
Try the following:
SortByColumns(
AddColumns(
Distinct(
colAllRecords,
PLN_STRT_DT
),
"planStartDateFormatted",
Text(DateTimeValue(Result), "[$-en-US]mm-dd-yyyy") //<---Formatting not being respected
),
"planStartDateFormatted",
Ascending
)
I hope this is helpful for you.
That worked!
(Wrapping my head around this):
- So we converted the Text-type column to DateTimeValue, then back to Text.
- The interim step there allowed PowerApps to apply the formatting.
- Yeah, that makes sense to me.
- Another trick up the sleeve for future apps.
Thanks again!
Yep, you got it. Since the date was in ISO time, we needed to let PowerApps turn it into its date type, then we could format it with the standard text function.
User | Count |
---|---|
254 | |
106 | |
96 | |
50 | |
39 |