cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Patch Dates to Excel

I need to patch my data to excel and excel keeps changing the date format. Instead of showing "dd/mm/yyyy", it kept showing "mm/dd/yyyy". This is despite the patch code having Text(vardate, "dd/mm/yyyy"). Please help, I'm out of my wits end 

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous ,

No - it would be the Text of (for example) 05/10/2021 . So the Patch would simply be 

Patch(
  TableName,
  YourRecordCriteriaHere,
  {YourDateTextColumn:Text(YourDateValue:"dd/mm/yyyy")}
)

Reading it back into a Date Picker DefaultDate

DateValue(YourDateTextColumn)

As I mentioned Excel as a data source has numerous limitations and this is one of the minor items.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Anonymous ,

You need to change the Excel field format to Text and then get the date back with DateValue() OR change to SharePoint and all this goes away. As a Database, Excel is a good spreadsheet . . .

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Anonymous
Not applicable

if I would to change my column to text, it will no longer be in date format, only numbers. 

@Anonymous ,

No - it would be the Text of (for example) 05/10/2021 . So the Patch would simply be 

Patch(
  TableName,
  YourRecordCriteriaHere,
  {YourDateTextColumn:Text(YourDateValue:"dd/mm/yyyy")}
)

Reading it back into a Date Picker DefaultDate

DateValue(YourDateTextColumn)

As I mentioned Excel as a data source has numerous limitations and this is one of the minor items.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Anonymous
Not applicable

@WarrenBelz  Thanks for the solution, it was able to solve my problem 🙂

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