Occasional Contributor

I have created a list from Excel, and I am trying to calculate the date difference in a column, I was able to create the formula in excel, however when I created the list in Teams, my formula no longer works, so I tried to use the formula from Support.office.com, however that formula doesn't work as well.  How do I calculate the date difference?  I used this formula =DATEDIF([Column1], [Column2],"d")

best response confirmed by ThereseSolimeno (Microsoft)
Solution
Hi,

You might want to look at Calculated columns and reference something like https://support.microsoft.com/en-gb/office/examples-of-common-formulas-in-lists-d81f5f21-2b4e-45ce-b...

Whilst the create list from Excel can be a nice option, not everything is guaranteed to work on the other side.

So as you are now essentially in the world of SharePoint, I would look to how you would achieve what you need in a SharePoint fashion.

Thanks

Henry
I tried the formula from that site and it didn't work.
Hi,
I'm having the same issue, though I have started from a blank list. I have also copied the formula and adjusted from the 'Issues' template.
After saving the formula, when I return it has stripped a set of brackets out.
I enter and save =DATEDIF([Deadline],[Reqd By],"d")
When I go to look it says =DATEDIF(Deadline,[Reqd By],"d")
I swapped the columns around and it still took them off 'Deadline.'
But in fact this is the second try as I was working with a different column and created 'Deadline' fresh just to test.
All are set as Date type. It doesn't matter if I type the column or use the 'Add to formula' list.
Any ideas please?
Sorted.
The brackets are only required with spaces in the name.
My errors were because I had the later date first, (thinking of subtractions) and it gives an error if the difference is negative.