I have an app that is used across multiple regions (US, UK, EU, etc...). I need to limit the use of certain parts of the app during specific set times. When I use the code below in the Visible property of the controls, it only allows for people in the US to enter due to the date format for different regions.
Now()<DateTimeValue("4/20/2021, 12:01:00 AM") || Now() >= DateTimeValue("5/19/2021, 12:01:00 AM")
I was thinking that I need to adjust the code to:
Text(Now(), dd/mm/yyyy)<Text(DateTimeValue("4/20/2021, 12:01:00 AM"), dd/mm/yyyy hh:mm:ss) || Text(Now(), dd/mm/yyyy) >= Text(DateTimeValue("5/19/2021, 12:01:00 AM"), dd/mm/yyyy hh:mm:ss)
But receive an error that it expected text. Where am I going wrong? I just need to have it available during these dates and times for users in all regions, regardless of their date/time format.
Solved! Go to Solution.
If you specify the locale in your call to DateTimeValue, that will ensure that the function parses your input date/time in the correct format.
Now()<DateTimeValue("4/20/2021, 12:01:00 AM", "en-US") || Now() >= DateTimeValue("5/19/2021, 12:01:00 AM", "en-US")
If you specify the locale in your call to DateTimeValue, that will ensure that the function parses your input date/time in the correct format.
Now()<DateTimeValue("4/20/2021, 12:01:00 AM", "en-US") || Now() >= DateTimeValue("5/19/2021, 12:01:00 AM", "en-US")
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
180 | |
52 | |
41 | |
38 | |
28 |
User | Count |
---|---|
255 | |
81 | |
71 | |
68 | |
66 |