So I am trying to make a unique ID out of a date and need to conviert it to a number ideally in the format yyymmdd.
I can get the date picker to display this way but when I try to put it in a label it converts it back to dd/mm/yyyy.
When I try:
Text(FromDate,"yyyymmdd")
Powerapps still displays it dd/mm/yyyy and converts the code to:
Text(FromDate,"[$-en-US]yyyymmdd")
Not sure why this is happening.
Can anyone help me out?
Cheers,
can we do this on textbox or have to do on datepicker's default date?
thank u cederbusch 🙂 it worked for me but i used Substitute(Text(DATE),"/","")
I can´t get this to work. Followed per instruction, still shows "yyyy-mm-dd".
Eventually used Substitute to remove all the "-".
Substitute(Text(FromDateDatePicker;"[$-us-US]yyyymmdd");"-";"")
Yep this worked.
Thanks.
Hi @Lewkir,
That's normal behavior from PowerApps. When using the Text() function, if you specify a format (like "yyyymmdd"), PowerApps will automatically add the "[$-en-US]" prefix to your format to tell the system what locale format to use. But in the end, you get the same result.
If you set the Default property of a text input control to Text(FromDate,"[$-en-US]yyyymmdd"), it will show your date with that format. You can then convert it to a integer using the Value() function.
Hope this helped,
Emmanuel
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional