Power Apps WeekNum and ISOWeekNum Function with Examples

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 ])
  1. DateTime: Date and Time Value Which is Required to operate on.
  2. StartOfWeek: Second Parameter Which is Optional. Either you can perform excel code or a StartOfWeek Enumeration.
Excel CodeStartOfWeekEnd of the WeekDescription
1,17
StartOfWeek.Sunday
SaturdayDefault Value. The week begins on Sunday.
2,11
StartOfWeek.Monday
SundayWeek begins on Monday.
12
StartOfWeek.Tuesday
MondayWeek begins on Tuesday .
13
StartOfWeek.Wednesday
TuesdayWeek begins on Wednesday .
14
StartOfWeek.Thrusday
WednesdayWeek begins on Thursday .
15
StartOfWeek.Friday
ThursdayWeek begins on Friday.
16
StartOfWeek.Saturday
FridayWeek begins on Saturday.
StartOfWeek Enumeration

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)
PowerApps WeekNum Function
PowerApps WeekNum Function

See the output below:

PowerApps WeekNum Function  Example
PowerApps WeekNum Function Example

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)
  1. 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:

PowerApps ISOWeekNum Function
PowerApps ISOWeekNum Function

See the output below:

PowerApps ISOWeekNum Function Example
PowerApps ISOWeekNum Function Example

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())
PowerApps Weekday Function
PowerApps Weekday Function

See the output below:

Power Apps weekday Function Example
Power Apps weekday Function Example

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())
PowerApps Day Function
PowerApps Day Function

See the output below:

PowerApps Day Function Example
PowerApps Day Function Example

This is how to use the day function in PowerApps.

Read PowerApps Chart Control

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())
PowerApps Month Function
PowerApps Month Function

See the output below:

PowerApps Month Function Example
PowerApps Month Function Example

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())
PowerApps Year Function
PowerApps Year Function

Here you can see the output:

PowerApps Year Function Example
PowerApps Year Function Example

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())
PowerApps Hour Function
PowerApps Hour Function

Here you can see the output:

PowerApps Hour Function Example
PowerApps Hour Function Example

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())
PowerApps Minute Function
PowerApps Minute Function

Here you can see the output:

PowerApps Minute Function Example
PowerApps Minute Function Example

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())
PowerApps Second Function
PowerApps Second Function

Here you can see the output:

PowerApps Second Function Example
PowerApps Second Function Example

It helps you to find the second function in PowerApps.

Related Power Apps tutorials:

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
>