cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dennis727
Level: Powered On

Excel Online (Business) to SharePoint list date conversion

I am having problems converting a date from an Excel Online (Business) document to a sharepoint list date item.

 

Ultimately the problem I'm dealing with is the date is represented as a float as below. How do I convert it, so that it shows the Date and Time for my SharePoint list?

msedge_SmsPC6Ya8E.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Excel Online (Business) to SharePoint list date conversion

 

Hi @Dennis727 ,

 

Unfortunately, the current method I can provide is to convert Date, but the time, I have no good way to restore it.

For restoring the contents of the Date section, please refer to the method below.

Expression reference:

addDays('1899-12-30',int(first(split(item()['Date'],'.'))),'yyyy-MM-dd')

Image reference:

165.PNG

164.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Excel Online (Business) to SharePoint list date conversion

 

Hi @Dennis727 ,

 

You could try changing the type of the field in the Excel table to Text.

Date and time need to be preserved, but the type here is recommended as Text, so that field values are not converted to Float when passed to SharePoint list.

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dennis727
Level: Powered On

Re: Excel Online (Business) to SharePoint list date conversion

Hi @v-bacao-msft,

Unfortunately this won't work for me, as I need to automate this process and cannot control the source data as it is provided to me externally.

thanks,

Dennis

Community Support Team
Community Support Team

Re: Excel Online (Business) to SharePoint list date conversion

 

Hi @Dennis727 ,

 

Unfortunately, the current method I can provide is to convert Date, but the time, I have no good way to restore it.

For restoring the contents of the Date section, please refer to the method below.

Expression reference:

addDays('1899-12-30',int(first(split(item()['Date'],'.'))),'yyyy-MM-dd')

Image reference:

165.PNG

164.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Dennis727
Level: Powered On

Re: Excel Online (Business) to SharePoint list date conversion

thanks @v-bacao-msft that worked a treat. For anyone using my exact example the expression is below:

addDays('1899-12-30',int(first(split(body('Get_a_row')?['CreatedDateExcel'],'.'))),'yyyy-MM-dd')
Highlighted
chico
Level: Powered On

Re: Excel Online (Business) to SharePoint list date conversion

@v-bacao-msft 

huge thank you!

 

found many other options in this forum, this was the one that worked for me.

adding some tags for future me.

 

addDays('1899-12-30',int(first(split(item()['Date'],'.'))),'yyyy-MM-dd')

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,135)