cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevenTIMI263
Helper I
Helper I

Patch a datepicker value to a SPO date Column

I need some help........

 

I'm struggling with a patch function. I tried almost everything, but I keep on seeing red lines. 
The field I try to patch is a datepicker. (datepDatum). 

The SPO column is a date and time field.

The error massage I see are like this.

Invalid argument type (Control). A Text value is expected instead.

The type of this date argument does not match the expected Record type. Type Date found.

The Patch function only has invalid arguments

What I understand is that there is a conflict between Text and Datevalue. But how can I change this,
See picture below.

Datevalue.png

 

Thanks from the Netherlands

Steven
 

1 ACCEPTED SOLUTION

Accepted Solutions

@StevenTIMI263 

I made a quick test in my environment, trying to patch a date from a DatePicker control to a SharePoint "Date and time" field.
You should be able to use the formula below:

Patch(Sessies, ThisItem, {Datum: datepDatum.SelectedDate})

Just make sure that the date column in your SPO list is name "Datum" and that its data type is "Date and time".

Also, I see that you're using [;] instead of [,].
I don't speak Dutch but the Patch function doc below does not seem to mention this syntax. Are you sure that this is appropriate?
De functie Patch - Power Apps | Microsoft Docs

View solution in original post

4 REPLIES 4
rsaikrishna
Community Champion
Community Champion

@StevenTIMI263 

 

Please give a try with following formula:

Patch(Sessies;ThisItem; {Datum: DateValue(Text(datepDatum.SelectedDate,DateTimeFormat.ShortDate))})

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

Sorry Krishna 😢
datep2.png

and this picture
datep3.png

 

Thanks for your quick replay. 

Kind regards
Steven

@StevenTIMI263 

I made a quick test in my environment, trying to patch a date from a DatePicker control to a SharePoint "Date and time" field.
You should be able to use the formula below:

Patch(Sessies, ThisItem, {Datum: datepDatum.SelectedDate})

Just make sure that the date column in your SPO list is name "Datum" and that its data type is "Date and time".

Also, I see that you're using [;] instead of [,].
I don't speak Dutch but the Patch function doc below does not seem to mention this syntax. Are you sure that this is appropriate?
De functie Patch - Power Apps | Microsoft Docs

Thanks. This solved my issue. In the Netherlands we use some different identifiers etc. 

,    is    ;   here.

 

Regards.

Steven  

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,723)