Power Automate Functions - Get TodayDate, DayWeek, DayNumber and DayName from the data Value

Power Automate Functions - Get TodayDate, DayWeek, DayNumber and DayName from the data Value

Get TodayDate, DayWeek, DayNumber and DayName from the data Value

In this guide, we will discuss how to get day week and from the day week we will extract Day Number and from the Day Number we will extract Day Name

To get TodayDate ‘todayDate’ variable will be used

Go to Power automate and create a new flow:

By clicking on the new button set its attributes like Flow Name and how to Trigger this flow? Finally hit on create button.


Power Automate Functions - Get TodayDAte, DayWeek, DayNumber and DayName from the data Value

Now first of all initialize the variable:
Name = Array List of Week Days
Type = Array
Value = [
"Monday",
"Tuesday",
'Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
]
Power Automate Functions - Get TodayDAte, DayWeek, DayNumber and DayName from the data Value

Now add a ‘Compose Action’:
In the compose action call ‘utcNow()’ function like mentioned in the image
Power Automate Functions - Get TodayDAte, DayWeek, DayNumber and DayName from the data Value

The output of the above action is :
Power Automate Functions - Get TodayDAte, DayWeek, DayNumber and DayName from the data Value

Now add another ‘Compose Action’:
In this composed action extract Day Number from the above action named UTC Date and Time Format.
Variable:
dayOfWeek 
code function:

dayOfWeek(outputs('Get UTC Date and Time Format'))
input:

Power Automate Functions - Get TodayDAte, DayWeek, DayNumber and DayName from the data Value

output:
here is the output of our function that we call in this action
Power Automate Functions - Get TodayDAte, DayWeek, DayNumber and DayName from the data Value

Now get the name of the day
Add another compose action and follow the below code and instructions
In this compose action we will extract the day Name from the day number.

You can also check here the Power Automate Functions - Add Days, Add utcNow, Range Function in Power Automate.

0 Comments

Thanks for commenting. Your comment will be live soon after approval.