HI all,
I would like to have my date to show in dd/mm/yyyy instead of US format :
i. I change the language property of the Date picker to "en-GB"
ii. I change the format to "dd/mm/yyyy" in the Text property of the date on Browse Screen
However, I realize when I search on browse screen. I still need to search in US format. I screenshotted the last picture which show when I search 6/1... (which is 1st/10/11...June in US format) , the respective date are only be filtered.
Can anyone help to show how I can filter/search in the Britain format instead of US on Browse screen?
Solved! Go to Solution.
Hi @isobelsoo ,
That does not help me much without knowing the error - I was providing syntax guidance more than anything and relying on your code posted, so going back to your original question, you want to search in dd/mm/yyyy format (I have only added a column here)
SortByColumns(
If(
Searchbox.Text<>"",
Filter(
AddColumns(
'BPC Power Apps Source Report',
"MyDate",
Text(Date,"dd/mm/yyyy")
),
Or(
Searchbox.Text in Category.Value,
'Mixer No.'.Value=Searchbox.Text,
Searchbox.Text in 'Product Item',
Searchbox.Text in 'Batch No.',
Searchbox.Text in 'Storage Tank No.'.Value,
Searchbox.Text in Status.Value,
Searchbox.Text in MyDate,
Searchbox.Text in Shift.Value
)
),
'BPC Power Apps Source Report'
),
"Date",
If(
SortDescending1,
Descending,
Ascending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi all,
Thank you so much for your time to help.
I have somehow managed to fix it by adding the Text(Date."dd/mm"yyyy") in the Search function itself.
Thank you! 🙂
@isobelsoo From the look of it u'r settings seem to be ok. Can you try with a date with day > 12 and check what happens.
You can see the it is able to be searched if I use US format.
If I search using Britain format,e.g. 26/6, nothing will be shown
By the way, I realized a weird situation - if I search in Britain format, I can see the filtered result as I type until "dd/", but once I include the month(regardless 06 or 6)( refer 2nd picture below), the result is gone.. I also attached my search function as 3rd picture for your reference.
Hi @WarrenBelz it is still same. Sharing more details of the issue as per below for your reference:
I realized a weird situation - if I search in Britain format, I can see the filtered result as I type until "dd/", but once I include the month(regardless 06 or 6)( refer 2nd picture below), the result is gone.. I also attached my search function below as 3rd picture for your reference.
Hi @isobelsoo ,
I am Australian and use date searches (in dd/mm/yyyy format) in most apps I have, so I would like to know a bit more about your issue.
What are you searching from (DatePicker etc) and what is the filter code?
Hi @WarrenBelz ,
The date by default in my power apps are mm/dd/yyyy. Hence, i change the formula to change it to dd/mm/yyy:
i. I change the language property of the Date picker to "en-GB" and change the format property of Date Picker to dd/mm/yyy on the Editscreen
ii. I change the format to "dd/mm/yyyy" in the Text property of the date on Browse Screen
My date was able to be shown in the format of dd/mm/yyyy after I did two changes stated above.
However, when I use the Search box in the browse screen, the date is not able to be filtered properly with dd/mm/yyyy format.
E.g. if I want to search 29/06/2021:
The filtered result is still showing when I type "29/" on search box. but once I type the month - "29/06", the result is all gone which means no result is found( you can refer 2nd picture below).
My filter codes is shown at the last section.
Thank you!
SortByColumns(If(Searchbox.Text<>"",
Filter('BPC Power Apps Source Report',Or(Searchbox.Text in Category.Value,'Mixer No.'.Value=Searchbox.Text,Searchbox.Text in 'Product Item',Searchbox.Text in 'Batch No.',Searchbox.Text in 'Storage Tank No.'.Value,Searchbox.Text in Status.Value,Searchbox.Text in Date,Searchbox.Text in Shift.Value)),
'BPC Power Apps Source Report'),"Date",If(SortDescending1, Descending, Ascending))
Hi @isobelsoo ,
Your filter code is way to small to read - can you please post it in Text
Hi @isobelsoo ,
I have not tried searching dates with a Text box before, but you are correct in that the underlying date in the data is mm/yy/dddd, so the easiest solution is to add your own column in the format you want. You could also do some of the below with the Search function, but to keep it simple.
With(
{wSearch:Searchbox.Text},
SortByColumns(
Filter(
AddColumns(
'BPC Power Apps Source Report',
"MyDate",
Text(Date,"dd/mm/yyyy),
),
IsBlank(wSearch) ||
(
'Mixer No.'.Value=wSearch ||
wSearch in MyDate ||
wSearch in Category.Value ||
wSearch in 'Product Item' ||
wSearch in 'Batch No.' ||
wSearch in 'Storage Tank No.'.Value ||
wSearch in Status.Value ||
wSearch in Shift.Value
)
),
"Date",
If(
SortDescending1,
Descending,
Ascending
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
252 | |
101 | |
94 | |
47 | |
38 |