In Power Apps, we may use PowerFX to implement the day, month, year, hour, minute, second, and weekday concepts. Let’s take a closer look.
Day PowerFX
Day PowerFX returns the day component of the current time and date. Syntax : Day(Now()). This will give you the current date part. If the date is 12/21/2021 then the result will be 21.
PowerFX Month
The month component of the current time and date is returned by Month PowerFX. Month(Now()) is the syntax. This will provide you with the current month’s information. The outcome will be 12 if the date is 12/21/2021.
PowerFX Year
PowerFX Year returns the current time and date’s Year component. Year(Now()) is the syntax. This will provide you with the current year information. The result will be 2021 if the date is 12/21/2021.
PowerFX for an hour
Hour The hour component of the current time and date is returned by PowerFX. Hour(Now()) is the syntax. This will provide you with the current year information. The result will be 18 if the date is 12/21/2021 6:43 PM.
PowerFX Minute
Minute PowerFX returns the current time and date’s Minute component. Minute(Now()) is the syntax. This will provide you with the current year information. The result will be 46 if the date is 12/21/2021 6:46 PM.
Second PowerFX
Second PowerFX returns the current time and date’s second component. Second(Now()) is the syntax. This will provide you with the current year information. The result will be 32 if the date is 12/21/2021 6:46 PM and the timing is 32.
PowerFX weekday
The weekday component of the current time and date is returned by Weekday PowerFX. The result will be 3 if the date is 12/21/2021.
If you want to mention the beginning of the week, the outcome will be as follows: If the date is Tuesday, December 21st, 2021, Weekday(Now(), StartOfWe ek.Monday) will return 2.