cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stefanlive
Frequent Visitor

Writing a date to excel table with patch

I am using the following code 

Patch(learnernames, LookUp(learnernames, Column1 = thestrippedname_2.Text),
{Column1: thestrippedname_2.Text, Column2: patchstartdate});Navigate(Options)

 

where

 

learnernames is a table of names, codes, etc about 27 columns long. Unfortunately when I started this project I forgot to put a name to the columns, regretting now but already coded in lots of palces to change them.

 

Column1 is a list of names with all spaces taken out and lowercase so "Fred Bloggs" is "fredbloggs"

 

thestrippedname_2 is lowercase no spaces so could be "fredbloggs" this is created by selecting a record from a gallery on the same screen.


Column12 is the column I want to store the data stored in patchstartdate which is a date column on excel and is entered on powerapps via date picker

 

I am convinced the problem is the formatting of the date, but I just can not work it out. I have tried changing it to a string and changin gthe date into different formats. 

 

Any help appreciated

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @stefanlive ,

 

If patchstartdate is a date picker control and you want to update the date back to Column2, then please use below formula instead:

Patch(learnernames, LookUp(learnernames, Column1 = thestrippedname_2.Text),
{Column1: thestrippedname_2.Text, Column2: patchstartdate.SelectedDate});Navigate(Options)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @stefanlive ,

 

If patchstartdate is a date picker control and you want to update the date back to Column2, then please use below formula instead:

Patch(learnernames, LookUp(learnernames, Column1 = thestrippedname_2.Text),
{Column1: thestrippedname_2.Text, Column2: patchstartdate.SelectedDate});Navigate(Options)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you that worked a treat

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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