cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MJ_RT
Helper I
Helper I

Patch Date Value in Excel

Hello,

I have built a form with a date picker and want to patch it into excel.

The date format in the Excel file is General.

What I did was: 

Patch(Table1; Defaults(Table1);{DateIn: Text(DateIn.SelectedDate)}).
The date in excel will show 29052020.

I added the format ""[$-de-DE]dd.mm.yyyy"", the patched date still shows 29052020

My last attempt before writing this post. is to create a label, with various TEXT options:

  • DateIn.SelectedDate
  • Text(DateIn.SelectedDate)
  • Text(DateIn.SelectedDate;"[$-de-DE]dd.mm.yyyy")

    all these options show the required format 29.05.2020, yet when I patch the value/text to excel. it still shows 29052020.

 

Not sure what am I missing here.

2 ACCEPTED SOLUTIONS

Accepted Solutions
eka24
Super User III
Super User III

Try to Patch the content of the Label instead of the DatePicker:

Patch(Table1; Defaults(Table1);{DateIn: Labe1.Text)})

OR

Patch(Table1; Defaults(Table1);{DateIn: Text(DateIn.SelectedDate,"dd.mm.yyyy")})

 

Another Suggestion is for you to change the General column to Text Column

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Thank you for your quick response. what has solved it is to change the format of excel cell into TEXT.

I have removed the label and kept it with date picker.
Therefore the final code was:

Powerapps

Patch(Table1; Defaults(Table1);{DateIn: Text(DateIn.SelectedDate)})

Excel:

Change cell format to TEXT

View solution in original post

2 REPLIES 2
eka24
Super User III
Super User III

Try to Patch the content of the Label instead of the DatePicker:

Patch(Table1; Defaults(Table1);{DateIn: Labe1.Text)})

OR

Patch(Table1; Defaults(Table1);{DateIn: Text(DateIn.SelectedDate,"dd.mm.yyyy")})

 

Another Suggestion is for you to change the General column to Text Column

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Thank you for your quick response. what has solved it is to change the format of excel cell into TEXT.

I have removed the label and kept it with date picker.
Therefore the final code was:

Powerapps

Patch(Table1; Defaults(Table1);{DateIn: Text(DateIn.SelectedDate)})

Excel:

Change cell format to TEXT

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,990)