How to use calculated time between in sharepoint

Örnvall Andreas 0 Reputation points
2025-12-11T07:44:55.0633333+00:00

Hello i am doing this code in sharepoint lists but get syntax error when doing this, what can i do instead?

User's image

User's image

User's image

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jayden-P 13,280 Reputation points Microsoft External Staff Moderator
    2025-12-18T08:17:01.14+00:00

    Hi @Örnvall Andreas

    I tried to reproduce your site, a Team site with default language in English, region is set to Swedish (Sweden).

    User's image

    The date format is YYYY-MM-DD. This formula works perfectly on my side.

    User's image

    =INT(EndTime-StartTime)&"d "&INT(MOD((EndTime-StartTime)*24;24))&"h "&ROUND(MOD((EndTime-StartTime)*1440;60);0)&"m"

    If you need only date (with no time), try using this official formula from Microsoft.

    =DATEDIF(StartTime;EndTime;"D")&" days"

     User's image

    2 people found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Örnvall Andreas 0 Reputation points
    2025-12-17T12:53:15.6166667+00:00

    It doesnt really say site settings but this is what i can find, i understand that creating a new site can detect if the issue is with the language but that do not really solve the problem, cause if it cant connect it to the original site i cant use that sharepoint list. maybe i need to find another solution to do this list.

    User's image

    User's image


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.