cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stefanlive
Level: Powered On

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
Community Support Team
Community Support Team

Re: Writing a date to excel table with patch

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
Community Support Team
Community Support Team

Re: Writing a date to excel table with patch

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

stefanlive
Level: Powered On

Re: Writing a date to excel table with patch

Thank you that worked a treat

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,301)