web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / PowerApp HalfDay Leave...
Power Pages
Answered

PowerApp HalfDay Leave Patch Fucntion

(0) ShareShare
ReportReport
Posted on by 17

Hello,

I added half day option in powerapps leave request. All thing works fine it calculate half day as required but 0.5 value is storing in my sharepoint list when i submit it store only '0' in sharepoint totaldays number which is number format below are FX:

 

Submit button FX using patch function:

{TotalDays: Int(Label9_4)},

 

Applied leave calculation (label9 display leave applied by user):

DateDiff(
Switch(
Radio1.Selected.Value,
"PM",
DateAdd(StartDate.SelectedDate,12, Hours),
StartDate.SelectedDate
),
Switch(
Radio2.Selected.Value,
"PM",
DateAdd(EndDate.SelectedDate,12,Hours),
EndDate.SelectedDate
),
Hours
) / 24

 

Categories:
  • Verified answer
    asad Profile Picture
    17 on at

    Now its working with below FX.

    {TotalDays: Value(Label9_4.Text)},

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 43

#2
sannavajjala87 Profile Picture

sannavajjala87 30 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 20 Super User 2026 Season 2

Last 30 days Overall leaderboard