October 13, 2024

The Power Apps Today function will return the date for the current day with the time as 00:00:00. Power Apps converts the value automatically to the user’s regional settings when displaying it in a Text field. For example, here in Portugal, I would like it as 15/07/2019. It’s possible to view it in any combination of fields so please the Text function for more details.

Limitations

  1. Power Apps Today is a volatile function, so each time it’s evaluated, the value may be different.
  2. This function will only return new values if the formula is reevaluated that happens when the state of the app changes, either by navigation, push of a button, control of a signal, refresh (or other related functions), UpdateContext (to update a variable’s value) or changes to a collection.

Recommendations:

  1. Time is returned always as 00:00:00, so please ignore it and consider it nonexisting. To get the actual time, please check the Now function.
  2. If you only need to deal with the date, prefer to use this function instead of the Now function. Other developers that look at this formula will know that only the date part is necessary, making it more legible. Besides, Power Apps does a lot of work for us automatically formats the field based on the user’s regional settings with no extra effort from our side.
  3. Don’t use this function to calculate the difference in days when you need more precision. Since the time returned is always 00:00:00, it may return invalid results. Prefer to use the Now function in these cases to get the exact value.
  4. Never use the textual value as a comparison, even if the string has the correct format that you want. Compare first and then convert the date into a user-friendly value.
  5. Avoid formatting this field when displaying it to a user. Formatting will always enforce the same layout and skips the user’s regional settings making a date, for some people, unreadable. Only do this if you have a strong reason to do so.

Sources:

Now, Today and IsToday functions in PowerApps

Back to the Power Apps Function Reference

Featured Image by Patrick Tomasso on Unsplash

Manuel Gomes

I have 18 years of experience in automation, project management, and development. In addition to that, I have been writing for this website for over 3 years now, providing readers with valuable insights and information. I hope my expertise allows me to create compelling, informative content that resonates with the audience.

View all posts by Manuel Gomes →

Leave a Reply

Your email address will not be published. Required fields are marked *

Mastodon