Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Patching or updating dates



basically i need to check if the date from sharepoint column(ReservedForTomorrow) is equal to todays date and if it is then copy/ that date to other column called ReservedFor. current code that doesn't run

Patch(Filter('Parking - Products'; StartsWith(Text(ReservedForTomorrow); Datenow)); {ReservedFor:Today()+23})

DateNow is a variable with todays date

i'm not a proffesional in this area and have been trying to fix it for days 😞


Accepted Solutions

@Keit While patching, one column can't refer to a value from another column in the SP list. You have to supply the value. If you don't have this value in the APP, you can use the record that the 1st patch returns and then do another patch with the value that's in it.

Set(patchedRecord, Patch('Parking - Products'; LookUp('Parking - Products'; ReservedForTomorrow=Today()); {ReservedFor:Today()}));
Patch('Parking - Products'; patchedRecord; reservedbytomorrow:patchedRecord.reservedby})


View solution in original post

Super User
Super User

@Keit Try this,

Patch('Parking - Products', LookUp('Parking - Products', ReservedForTomorrow=Today()), {ReservedFor:Today()+23})


Regular Visitor

sadly that didn't update that reservedfor 

@Keit what datatypes are ReservedForTomorrow & ReservedFor?


Regular Visitor

date and time 



@Keit Try setting it to Date Only



Regular Visitor

Thanks this worked, had to change the date codes on all screens.

another question how would i be able to patch text columns that conatin emails too, code that i tried below didn't accept it

Patch('Parking - Products', LookUp('Parking - Products', ReservedForTomorrow=Today()), {ReservedFor:Today()};{reservedbytomorrow:reservedby})


@Keit when you want to patch multiple fields, separate them with a comma,

Patch('Parking - Products', LookUp('Parking - Products', ReservedForTomorrow=Today()), {ReservedFor:Today(), reservedbytomorrow:reservedby})

Please remember to give a 👍 and accept the solution as it will help others in the future.


Regular Visitor

the last one only lets me choose datacards not the column value

@Keit I'm not quite sure what you mean by that. If you have a TextInput that has the email, you will have to write, my TextInput.Text

Hope that helps. 

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

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 (3,897)