Search
  • kriSHna

Working with date time options in power automate and power apps

Most of us have been using the date-time field options in both power apps and Power Automate, in this blog post I would like to explain a few simple tricks that will make your life even easier.


Retrieving weekday value from a given date - Power Automate


At times we would like to display the name of the week instead of the date value in power automate.


You can make use of the following expression to achieve the same.

formatDateTime(utcNow(),'dddd dd-MM-yyyy')

If we make use of this expression the outcome will be as follows.

For displaying the date value in format Monday-Month-year replace "dd" in above expression with "dddd"


Get milliseconds value from the given date - Power Automate


Many of the event creation actions at times require us to append even the millisecond value for the date value being passed. We can make use of the following expression to add millisecond value to the date being passed.

formatDateTime(utcNow(),'dddd dd-MM-yyyyTHH:mm:ss.ffffZ')

When we use "f" this will give us tenths second of a DateTime value in power automate we can keep on adding for obtaining a greater precision. For obtaining a non zero value in a millisecond you can specify "F".

Specify 12 and 24-hour time format in Power Automate


If you would like to differentiate between the 12-hour format and 24-hour time format in power automate you can easily do that by modifying the hour value in the above-mentioned expression.


When the value is specified as "hh" then the time value will be displayed in 12-hour format, when it is specified as "HH" then the time value will be displayed in 24-hour format.


For specifying the AM/PM designator you can add "tt" in the expression. This will be helpful when retrieving the time value in a 12-hour format.

formatDateTime(utcNow(),'dddd dd-MM-yyyyTHH:mm:ss.ffff ttZ')

For more insights related to the different format specifiers and the value that they add in the expression please visit the link.


In the next blog, we will see working with the date-time values in power apps. Thanks for your time. Please do comment and let me know if this was helpful.