Formula in a Sharepoint List error

Anonymous
2022-05-11T23:09:36+00:00

Hello, I would like to be able to calculate the difference between two columns that happen to be in Date and Time format. I use exactly the syntax that is proposed by Windows, I only change the name of the variables by the name of my column, but when I arrive to create my new calculated column, it tells me that there is an error of syntax. I tried every way to write it, but I never managed to succeed.

Windows:

=TEXT([Column2]-[Column1],"h:mm:ss")

My colomns name: Entrées

                           Sorties

So:

=TEXT([Sorties]-[Entrées],"h:mm:ss")

I put pictures for information.

Thanks you in advance!

![](https://learn-attachment.microsoft.com/api/attachments/4eb6467b-0ff2-477c-bf2b-4bd1a39aabeb?platform=QnA"https://learn-attachment.microsoft.com/api/attachments/eb21309a-54aa-40f4-8895-11a1423f9609?platform=QnA" rel="ugc nofollow">

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Anonymous
    2022-05-12T00:03:11+00:00

    Hi Antoine,

    Thank you for posting your query in our community.

    Per your description, you want to calculate Time difference in calculated column. However, when you try to create a formula in the calculated column, an error 'The formula contains a syntax error or is not supported.' will pop up. About the formula, I tested it on my side, and there was no problem. You can check below images:

     

    As the error message shows, when you enter the symbols, please make sure they are paired correctly with the right language, for example: () and "".

    And if you use the ";" instead of ",",  for your formula so it should be like this: =TEXT([Entrees]-[Sorties];"h:mm:ss"), will the same error occur?

    Best regards,

    Jazlyn

    0 comments No comments
  2. Anonymous
    2022-05-12T01:21:41+00:00

    Hi, thanks for your anwsers!

    Yeah, i've already tried all that and it doesn't work..

    0 comments No comments
  3. Anonymous
    2022-05-12T07:06:45+00:00

    Hi Antoine,

    Thank you for the reply.

    If there is nothing wrong with the formula itself. The only method I found is to remove the "=":

    If the problem persists, try creating a new list in your SharePoint site, add two date columns and use this formula. Just to make sure if there is any issue with the current SP list. 

    Best regards,

    Jazlyn

    0 comments No comments