Sharepoint calculate column date before today, then return yes--> syntax errors

Anonymous
2024-01-18T17:32:46+00:00

Hi all,

In sharepoint lissts I want to create a column that returns "yes" when the date in column "X" is earlier than today's date. I only get syntax errors.

Could someone help me with this?

=IF([X] < [Today], "Yes", "No")

Cheers,

Aida

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

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-18T17:48:13+00:00

    Dear respected Aida Kidane Gebremeskel.

    Good day! Thank you for posting to Microsoft Community. We are happy to help you.

    I’m sorry you’re having a problem but based on your description we can work together to resolve it.

    For the situation you encountered, we deeply understand the inconvenience caused and apologize for it.

    As per your description, in SharePoint, you cannot directly use [Today] in calculated columns to compare with another date.

    To create a column that returns "Yes" when the date in the column "X" is earlier than today's date without causing syntax errors, you can use the following workaround:

    Workaround 1:

    Create another column (calculated column and use TODAY () formula) in the SharePoint online list called Today and set it as a calculated column with formula as Today. This column can be hidden in views (if you want to hide).

    Then use Formula:

    Image

    Workaround 2:

    Create a new date column in the list, call it "Current Date" or something similar. Then create your calculated column with the formula:

    =IF(X<[Current Date],"Yes","No")

    Image

    Result:

    Image

    Please understand that our initial reply may not always immediately resolve the issue. However, with your help and more detailed information, we can work together to find a solution.

    Appreciate your patience and understanding and thank you for your time and cooperation.

    Sincerely,

    Waqas Muhammad

    0 comments No comments
  2. Anonymous
    2024-01-23T08:30:41+00:00

    Hi respected Aida Kidane Gebremeskel.

    I'm writing a follow up this case, and I haven’t received any information from you, may I know have you checked above reply? Feel free to post back if you need further assistance.

    Have a good day and stay safe 😊

    Sincerely,

    Waqas Muhammad

    0 comments No comments