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.
Now first of all initialize the variable:
Name = Array List of Week Days
Type = Array
Value = [
"Monday",
"Tuesday",
'Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
]
Now add a ‘Compose Action’:
In the compose action call ‘utcNow()’ function like mentioned in the image
The output of the above action is :
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:
output:
here is the output of our function that we call in this action
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.