In this PowerApps Tutorial, we will discuss what is WeekNum function and ISOWeekNum function is in PowerApps. We will see how to use the WeekNum function in Power Apps with some examples. Also, we will see, a few examples of the Power Apps ISOWeekNum function.
Also, we will cover all these topics:
- What is PowerApps WeekNum function
- ISOWeekNum functions in Power Apps
- How to use Getweek number in Power Apps
- PowerApps WeekNum update function
- Power Apps Weekday Function
- How to use Day Function in Power Apps
- Power Apps Month Function
- Year Function in PowerApps
- Power Apps Hour Function
- How to use Power Apps Minute Function
- Power Apps Second Function
What is WeekNum Function in PowerApps
- PowerApps WeekNum Function, returns a week number and the results range from 1 to 54 (since a Year has 54 weeks). Weeknum function starts counting on the week that contains the 1st of January.
- By Default, the week starts on Sunday.
PowerApps WeekNum Function Syntax
Below represents the syntax of PowerApps WeekNum Function.
WeekNum(DateTime [StartOfWeek ])
- DateTime: Date and Time Value Which is Required to operate on.
- StartOfWeek: Second Parameter Which is Optional. Either you can perform excel code or a StartOfWeek Enumeration.
Excel Code | StartOfWeek | End of the Week | Description |
1,17 | StartOfWeek.Sunday | Saturday | Default Value. The week begins on Sunday. |
2,11 | StartOfWeek.Monday | Sunday | Week begins on Monday. |
12 | StartOfWeek.Tuesday | Monday | Week begins on Tuesday . |
13 | StartOfWeek.Wednesday | Tuesday | Week begins on Wednesday . |
14 | StartOfWeek.Thrusday | Wednesday | Week begins on Thursday . |
15 | StartOfWeek.Friday | Thursday | Week begins on Friday. |
16 | StartOfWeek.Saturday | Friday | Week begins on Saturday. |
PowerApps WeekNum Example
Let us see an example of how to use the WeekNum function in Power Apps.
For this, I have created a Canvas app in Power Apps. Then I have added a date picker control on it. For this, click on Insert -> DatePicker in PowerApp Canvas App. Then I have added a label control in it and wrote the below function, on the Text property.
WeekNum(DatePicker1.SelectedDate,StartOfWeek.Sunday)
See the output below:
This is how to use the WeekNum function in Power Apps.
Read PowerApps nested gallery control example
What is ISOWeekNum Function in PowerApps
PowerApps ISOWeekNum Function returns a week that contains the first Thursday as the first week of the year and the results range from 1 to 52/53.
PowerApps ISOWeekNum Function Syntax
Below represents the syntax of the PowerApps ISOWeekNum function.
ISOWeekNum(DateTime)
- DateTime –> Date and Time value which is required to operate on. ISOWeek always begins on Monday.
PowerApps ISOWeekNum Example
Let’s see the example for ISOWeekNum function in Power Apps.
Created a canvas app in PowerApps and just added a Datepicker control in it. For that, select Insert -> DatePicker. And added the label control in it for the ISOWeeknum function under text property as shown below:
See the output below:
This is how to use PowerApps ISOWeekNum function.
In this article, we have learned how to use the WeekNum function and ISOWeeknum function in Power Apps.
Read Create Login Page in PowerApps using SharePoint List
Power Apps Weekday Function
Let us discuss weekday Functions in Power Apps.
Power Apps Weekday function returns the number which represents the day of the week. (For example, 1 is a Sunday, 2 is a Monday, etc.,) Followed by, explained some components related to Power Apps weekday function.
In the Power Apps Weekday function, there are two ways that you can specify the ranges. Either you can range with a Microsoft Excel Weekday function code or a StartOfWeek enumeration value.
By Default, the Weekday function Component returns the date and time value ranges from 1 (Sunday) to 7 (Saturday).
PowerApps Weekday Function Syntax
Below represents the syntax of PowerApps Weekday Function.
Weekday(DateTime[WeekdayFirst])
PowerApps Weekday Function Example
Power Apps Weekday function returns the Weekday value of the current date and Time.
For the below example, the current Time is 11:42:42 AM Wednesday, January 12, 2022.
In the PowerApps canvas app, I have added a label control and set the Default property like below:
Weekday(Now())
See the output below:
You can easily use this way to work with the weekday function in PowerApps.
Read How to create a custom calendar in PowerApps
PowerApps Day Function
Power Apps Day function returns the current date value. The Day function Component returns the date and time value ranges from 1 to 31.
PowerApps Day Function Syntax
Below represents the syntax of the PowerApps Day function.
Day(DateTime)
PowerApps Day Function Example
For the below example, the current date is Wednesday, January 12, 2022. Add label control in the PowerApps canvas app and write the below function under Default property.
Day(Now())
See the output below:
This is how to use the day function in PowerApps.
PowerApps Month Function
Power Apps Month Function returns the current month value. The Month function Component returns the date and time value range from 1 to 12.
PowerApps Month Function Syntax
Below represents the syntax of the PowerApps Month Function.
Month(DateTime)
PowerApps Month Function Example
For the below example, the current date is Wednesday, January 11, 2022. Add label control in the PowerApps canvas app and write the below function under Default property.
Month(Now())
See the output below:
In this manner, you can use the Month Function in PowerApps.
Read How to build multilingual apps in PowerApps
PowerApps Year Function
Power Apps Year Function returns the current Year value. The Year function starts with 1900 and the component returns the date and time value.
PowerApps Year Function Syntax
Below represents the syntax of PowerApps Year Function:
Year(DateTime)
PowerApps Year Function Example
For the below example, the current date is Wednesday, January 12, 2022. Add label control in the PowerApps canvas app and write the below function under Default property.
Year(Now())
Here you can see the output:
The above example shows you how to find the year function in PowerApps
Read Automatically scroll Gallery control in PowerApps
PowerApps Hour Function
Power Apps Hour Function returns the Hour value of the current date and Time. The Hour Function ranges from 0 (12:00 AM) to 23 (11:00 PM) and the component returns the date and time value.
PowerApps Hour Function Syntax
Below represents the syntax of the PowerApps Hour function.
Hour(DateTime)
PowerApps Hour Function Example
For the below example, the current Time is 11:42:42 AM Wednesday, January 12, 2022. Add label control in the PowerApps canvas app and write the below function under Default property.
Hour(Now())
Here you can see the output:
You can find this example for Hour Function in PowerApps
Read PowerApps notify function- How to use
PowerApps Minute Function
Power Apps Minute Function returns the Minute value of the current date and Time. The Minute function Component returns the date and time value range from 0 to 59.
PowerApps Minute Function Syntax
Below represents the syntax of the PowerApps Minute Function.
Minute(DateTime)
PowerApps Minute Function Example
For the below example, the current Time is 11:42:42 AM Wednesday, January 12, 2022. Add label control in the PowerApps canvas app and write the below function under Default property.
Minute(Now())
Here you can see the output:
The above example makes it easier for you to use the Minute Function in PowerApps.
Read Share PowerApps to external users or guest users
PowerApps Second Function
Power Apps Second Function returns the Second value of the current date and Time. The Second function Component returns the date and time value range from 0 to 59.
PowerApps Second Function Syntax
Below represents the syntax of PowerApps Second Function.
Second(DateTime)
PowerApps Second Function Example
For the below example, the current Time is 11:42:42 AM Wednesday, January 12, 2022. Add label control in the PowerApps canvas app and write the below function under Default property.
Second(Now())
Here you can see the output:
It helps you to find the second function in PowerApps.
Related Power Apps tutorials:
- Power Apps SharePoint Button
- Power Apps in SharePoint
- Power Apps Radio Button
- Power Apps Navigate Function + 16 Examples
- Saving microphone audio recorded in PowerApps to SharePoint online
- PowerApps filter SharePoint list Example
- Display COVID-19 Power bi report in PowerApps
- How to embed Power bi report in PowerApps portal
- How to display Power bi google analytics in PowerApps
In this tutorial, we have learned how to use the Weekday function in PowerApps and below examples:
- WeekNum Function in Power Apps
- ISOWeekNum Function in Power Apps
- Power Apps Weekday Function
- Power Apps Day Function
- Power Apps Month Function
- Power Apps Year Function
- Power Apps Hour Function
- Power Apps Minute Function
- Power Apps Second Function
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.