cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Convert Excel date value

Hi,

I get a date value from Excel in the form 43201 as an example.

How can I make a date value out of this number that I can use in a condition to evaluate whether this date is less or greater than the current date?

Would be great if somebody could help.

Best regards,

Ludwig 

21 REPLIES 21

Thank you!  Unfortunately there is still something I'm missing as I'm now getting the below message.  I'm guessing it has something to do with the format the date is in in excel, but I've tried date format (both in US and UK), integer (the original format) and string and the message is the same.  The SharePoint list columns are Date/Time and unfortunately I can't change the format because they are linked to a Power App.  I think I'm going to have to go to plan B which is to create a new SharePoint list and link that to the app.

If anyone has any suggestions as to what the issue is (or could spot the typo which is the only other thing I can think of) I'd be very grateful!

The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Estimated_x0020_Go_x002d_Live_x0' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'.

Formula being used:  

if(empty(items('ApplyEachDates')?['Est_x002e_ Project Close Date']),'', addDays('1899-12-30', int(items('ApplyEachDates')?['Est_x002e_ Project Close Date']), 'dd/mm/yyyy'))
 
And screenshot of flow
SharePoint update issue.PNG

I do see spaces in your formula, in between Project Close Date, so that is probably not correct. And I'm not sure if this applies to you, but I did have to plug my date fields into String variables to check what format they were in. Since the Excel source could have been changed by any user and the format altered in some way, I first plugged the dates into String variables and then checked for the presence of forward slashes: / 

If there were slashes, then the Excel field was already in a date format that SharePoint could take directly and there was no need for the compose action. I plugged the Excel field directly into the SharePoint date field and it was fine.

If there were NO slashes, I knew I had an integer and needed to use the Compose action to format the value in a way that SharePoint could understand.

variables.PNG

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

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.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,382)