September 20, 2020

The Power Apps Now function will return the current moment’s date, including the time. 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 see a date like “15/07/2019 17:32”. It’s possible to show any combination of fields, so please check the Text function for more details.

Limitations

  1. Now 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. If you only need to display or do calculations based on the date, prefer using the Today function. Other developers that look at this formula will know that only the data part is necessary, making it more legible. Besides, Power Apps does a lot of work for us by automatically formatting the fields based on the user’s regional settings.
  2. Never use the textual value as a comparison, even if the string has the correct format that you want. Compare first and then convert it into a user-friendly value. If you don’t you may end up with faulty comparisons because you’re checking the same dates in two different regional settings.
  3. Avoid formatting this field when displaying it to a user. Formatting will always enforce the same layout and ignoring the regional settings making, for some people, the data unreadable. Only do this if you have a strong reason to do so.

Sources:

Now, Today, and IsToday functions in Power Apps

Back to the Power Apps Function Reference

Featured Image by Juli Moreiraon Unsplash

Manuel Gomes

I'm a Project Manager with experience in large projects and companies. I've worked in the past for companies like Bayer, Sybase (now SAP) and I'm currently working for Pestana Hotel Group.

View all posts by Manuel Gomes →

Leave a Reply