cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SergioTorrico
Regular Visitor

Saving/Retrieving dates from Excel

Hello! I'm building an app that has to read a series of dates from excel records and be able to modify them
In my excel file the column is set to be a "date" type formatexcel.PNG

 

At first I was having trouble reading this into a DatePicker in powerapps, but after some research I was able to read it with Date(Text(column,format)) as such

readpowerapps.PNG

So now the dates show correctly, however, when I want to edit them and save them and the patch function is giving me trouble
I tried 2 things:
1) Save as a Text (as per suggestions found here):

savepoerappsastext.png

But as you can see It wont save because the type is not what is expected and as such it gives me an error

 

2) My original plan was to simply save as a Date, but even with the datepicker formatted to show mm/dd/yyyy (as shown below)
formatpowerapps.PNG

when I patch a date (no error) it is saved in excel with the yyyy-mm-ddThh:mm:ss format which brakes my excel file and table and the functionality i need from it
savewrongexcel.PNG

I believe I could save the whole thing as a text but that would prevent me from using filtering options, date is really what I need for this project
Is there something I'm doing wrong? should the date be formatted somehow for patch? can i somehow force patch to accept the "wrong" type and push a text which excel would understand? I'm lost, please help

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @SergioTorrico,

Do you want to patch a selected date to excel as "mm/dd/yyyy"?

 

I would always suggest a GENERAL column in the excel table to save the selected date from Power Apps.

If the GENERAL column does not affect your data set, please make sure you have a GENERAL column to save the date and modify your formula as below:

Patch(Table_1,BookDiscussionsGallery.Selected,{SendDate:Text(SendDateOicker.SelectedDate,"mm/dd/yyyy")})

 

Here is a similar thread you could check for reference:

Solved: Re: Date Picker to Excel Format - Power Platform Community (microsoft.com)

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @SergioTorrico,

Do you want to patch a selected date to excel as "mm/dd/yyyy"?

 

I would always suggest a GENERAL column in the excel table to save the selected date from Power Apps.

If the GENERAL column does not affect your data set, please make sure you have a GENERAL column to save the date and modify your formula as below:

Patch(Table_1,BookDiscussionsGallery.Selected,{SendDate:Text(SendDateOicker.SelectedDate,"mm/dd/yyyy")})

 

Here is a similar thread you could check for reference:

Solved: Re: Date Picker to Excel Format - Power Platform Community (microsoft.com)

Best Regards,
Qi

Thanks, that would've worked,
But i just ended up moving everything to a sharepoint list, excel just seemed slow and clunky

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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