Start and End dates validations in Sharepoint list

Anonymous
2022-08-01T09:34:24+00:00

Hi all,

I am working on a requirement in Sharepoint list, which requires me to create two columns of date and time type namely "Start Date" and "End Date" to record start & end timings along with respective dates. My requirement is:

Start Date=06/24/2022 9:00 am

End Date=06/24/2022 11:00 am

End Timing > Start Timing and both dates should be same.

I have tried list validation settings, for the timing part. But how to club both the conditions under list validation settings option & what should be the date condition?

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
Answer accepted by question author
  1. Anonymous
    2022-08-03T07:07:26+00:00

    Dear Aisha,

    Thank you for the reply.

    For your requirement, you can try this formula:

    =AND(YEAR([Start date])=YEAR([End date]),MONTH([Start date])=MONTH([End date]),DAY([Start date])=DAY([End date]),[End date]>[Start date])

    Sincerely,

    Jazlyn | Microsoft Community Moderator

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-08-01T11:31:22+00:00

    Dear Aisha,

    Good day! Thank you for posting your query in our community. We are happy to help you.

    For your requirements, you can try the following formula:

    =AND(DAY([Start date])=DAY([End date]),[End date]>[Start date])

    Please note that for a column validation, you can’t reference other columns for this type of validation. So you need to use the List validation via List settings > Validation settings >  enter the formula above.

    Sincerely,

    Jazlyn | Microsoft Community Moderator

    ***Note: In the event that you're unable to reply to this thread, please ensure that your Email address is verified in the Community Website by clicking on Your Account Name > "My Profile" > "Edit Profile" > Add your Email Address > tick "Receive email notifications" checkbox > click on "Save".***

    0 comments No comments
  2. Anonymous
    2022-08-02T13:05:49+00:00

    Hi,

    Thankyou for your response. My query now is, what if user by mistakely adds incorrect month.

    E.g. Start Date=06/30/2022 9:00 am

    End Date=07/1/2022 11:00 am

    I have tested using the formula provided, but it doesn't fulfill this condition. Can you please help?

    0 comments No comments