cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MJ_RT
Frequent Visitor

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

MJ_RT
Frequent Visitor

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

MJ_RT
Frequent Visitor

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (90,411)