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

How do I include an excel date in Sharepoint. I've visited other threads, but without success.

Hi, I'm trying to get a date from excel and insert it into Sharepoint, but the following error appears.

 

Erro 1.PNG

 

That's the expression I'm trying to put. I've tried several other expressions from other forums, but without success.

 

if(equals(items('Apply_to_each')?['Request_Date'], 'null'), " '', addDays('1899-12-30', int(items('Apply_to_each')?['Request_Date']), 'MM/dd/yyyy'))
 
If I insert "float" in the expression, it gives an error, if I insert "int", it also gives an error
 
I've tried before:
if(equals(item()?['Request_Date'],''),null, item()?['Request_Date'])
 
formatDateTime(addDays('1900-01-01', add(int(items('Apply_to_each')?['Request_Date']),-2)), 'dd/MM/yyyy')
 
if(equals(item()?['Request_Date'],''),null, addSeconds('1899-12-30',int(formatNumber(mul(float(item('Apply_to_each')?['Request_Date']),86400),'0','en-us')),'yyyy-MM-dd HH:mm:ss'
 

 

Erro 2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Rhiassuring
Super User
Super User

Hey there, 

 

Here's what worked for me (just tried & confirmed):

 

if(empty(items('Apply_to_each_2')?['DueDate']),null, addDays('1899-12-30',int(item()['DueDate']),'yyyy-MM-dd'))

 

 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



View solution in original post

1 REPLY 1
Rhiassuring
Super User
Super User

Hey there, 

 

Here's what worked for me (just tried & confirmed):

 

if(empty(items('Apply_to_each_2')?['DueDate']),null, addDays('1899-12-30',int(item()['DueDate']),'yyyy-MM-dd'))

 

 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,796)