cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Create sharepoint item with date

Hi,

 

I wish to create a sharepoint item and the field values come from excel. One of the field in excel is a date with this format "dd/mm/yyyy". However when I put the date in the sharepoint field, an error occurs. What could be the problem?

sbgoh_0-1596293697611.png

 

4 REPLIES 4
Highlighted
Super User
Super User

Re: Create sharepoint item with date

When you read a date and time for excel its returned as numeric value. You can see in your screenshot the date is returned as  44048.

 

When you insert this into share point date field you will get error.

You can use thsi function to convert it back into date :

 

addDays('1899-12-30',int(items('Apply_to_each')?['DueDate']),'yyyy-MM-dd')

 

Where items('Apply_to_each')?['DueDate'] is the date variable from excel

 

You can change the format of that time as per your share point.

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,
Rahber

Highlighted
Resolver I
Resolver I

Re: Create sharepoint item with date

Hi, I tried but I encountered another error below. No idea why. 😞

sbgoh_0-1596362816832.png

 

Highlighted
Community Support
Community Support

Re: Create sharepoint item with date

Hi @sbgoh ,

 

Could you please share the screenshot of the excel table?

Could you please share the screenshot of the configuration and the run history of the flow?

Please make sure that date in your excel table would only contains the date, it shouldn't contains the time when use the int() expression.

 

Best Regards,

Alice

 

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

 

Highlighted
Resolver I
Resolver I

Re: Create sharepoint item with date

Hi Alice,

Here is my excel table. Something this field is empty.

 

sbgoh_0-1596449299467.png

In the "Create item", open date, I set the following expression:

addDays('1899-12-30',int(items('Apply_to_each')?['openDate']),'yyyy-MM-dd')

sbgoh_1-1596449441286.png

Run History below.

sbgoh_3-1596449726409.png

 

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (8,150)