cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rpeters1977
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
Rpeters1977
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
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.

 

 

Rpeters1977
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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,808)