How to get the day of the week from a date.(Power Automate Desktop)

Japanese version.

Learn how to get the day of the week from a date in Power Automate Desktop.

Steps

First, the date/time variable is obtained from an action such as "Convert text to datetime" or "Get current date and time" or from various properties.

Then, for the acquired Datatime variable, use the property or action corresponding to the desired information.

Text:DayOfWeek property

DayOfWeek in the expression will get the day of the week in text.

%DatatimeVariable.DayOfWeek%

The result of the execution is as follows

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday

Numeric: "Run JavaScript" action

To get it numerically, use the "Run JavaScript" action and run the following code.

WScript.StdOut.Write(new Date("%DatatimeVariable%").getDay() );
Day of weekValue
Monday0
Tuesday1
Wednesday2
Thursday3
Friday4
Saturday5
Sunday6

For those who want to learn Power Automate Desktop effectively


The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.

Table of Contents.

Update History.

Links

Tips(Power Automate Desktop)