Day

How to Use the Power Fx Day  Function in Power Apps

What is the Power Fx Day Function?

The Power Fx Day function is a formula that allows you to extract the day value from a date. It’s a powerful tool that can simplify your calculations and save you time.

How to Use the Power Fx Day Function

To use the Power Fx Day function in Power Apps, you first need to understand the syntax. The syntax for the Day function is as follows:


Day( Date )


The Date parameter is the date you want to extract the day value from. Here’s an example of how to use the Day function:


Day( DateValue( "05/25/2021") )


This formula will return the day value of 25.

Using the Power Fx Day Function with Other Formulas

The Power Fx Day function can also be used in combination with other formulas to achieve more complex calculations. For example, you can use it with the Date function to calculate the number of days between two dates. Here’s an example:


DateDiff( DateValue( "05/25/2021" ), DateValue( "05/10/2021" ), Day )


This formula will return the number of days between May 10th and May 25th, which is 15.

Power Fx Day Function with Conditional Statements

You can also use the Power Fx Day function with conditional statements to create dynamic calculations. For example, you can use it with the If function to check if a date falls on a weekend. Here’s an example:


If( Weekday( DateValue( "05/29/2021" ) ) = 1 || Weekday( DateValue( "05/29/2021" ) ) = 7, "Weekend", "Weekday" )


This formula will return “Weekend” because May 29th, 2021 falls on a Saturday.

In conclusion, the Power Fx Day function is a powerful tool that can simplify your calculations in Power Apps. By understanding the syntax and using it in combination with other formulas and conditional statements, you can create dynamic and efficient calculations. We hope this article has provided you with the information you need to effectively use the Power Fx Day function.

Power Apps Training Courses by G Com Solutions (0800 998 9248)