web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching Dates For All...
Power Apps
Unanswered

Patching Dates For All in a Collection

(0) ShareShare
ReportReport
Posted on by

I currently have a collection with two particular columns causing issue. The first is a Date column and the second is a DateTime column. Due to a legacy feature of the application, the date in the DateTime column does not always match the date in the Date column. As a result, I end up with a collection that looks like this:

Date                    DateTime

11/01/2020         11/01/2020 06:00 AM

11/02/2020         11/01/2020 06:00 AM

11/03/2020         11/01/2020 06:00 AM

11/04/2020         11/01/2020 06:00 AM

11/05/2020         11/01/2020 06:00 AM

 

How would I create a patch function that patches the correct dates from the Date column onto the DateTime column? I figure it will have some kind of ForAll where I patch DateTimeValue(Date & " " & TimeValue(DateTime)), but I am not sure what the exact syntax will look like. 

Categories:
  • Geeks_D Profile Picture
    1,169 on at

    Hello 

    You can patch this with command

    Text(DateValue(Date.text),DateTimeFormat.ShortDateTime)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Think you should be able to set up something like this. Might be a typo, just sending from my phone but should get you close

     

    ForAll(listName As listToParse, 
    	With({timeVariable: TimeValue(listToParse.DateTime)},
     Patch(listName, ID=listToParse.ID, {DateTime: DateTimeValue(Text(listToParse.Date&" "&TimeValue(timeVariable))})
    	 )
     )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard