cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Patch function to write date time field back to SharePoint

I have the following problem i want to save the date and time back to SharePoint. What I have is this:

Tijdstip_x0020_incident:DateValue5.SelectedDate+Time(Value(HourValue5.Selected);0;0) What do i have to do to get the Hour value in with it saying not a number or invalid argument type.

 

The Hour field is a datacard field from SharePoint: image.png

 

Any tips are welcome!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Regular Visitor

Re: Patch function to write date time field back to SharePoint

Thanks you for the reply!

 

 

Just needed to add Tijdstip_x0020_incident: DateValue5.SelectedDate+Time(Value(HourValue5.Selected.Value);0;0)

 

Without this it will not work!

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: Patch function to write date time field back to SharePoint

I would recommend using DateAdd with the new Hours option eg

DateAdd(Value5.SelectedDate,Value(HourValue5.Selected),Hours)

I wrapped HouseValue5.Selected in Value as I am gussing its a string, not a number.

 

 

Highlighted
Regular Visitor

Re: Patch function to write date time field back to SharePoint

Thanks you for the reply!

 

 

Just needed to add Tijdstip_x0020_incident: DateValue5.SelectedDate+Time(Value(HourValue5.Selected.Value);0;0)

 

Without this it will not work!

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,868)