Compare the Text Date Time Value

Copper Contributor

Hi,

 

Kindly assist how can I put column validation for my Start and End Date in My Sharepoint list for Single Text field. Below is my formula in PowerApps:

 

If(DateTimeValue(StartDate.Text)>=DateTimeValue(EndDate.Text))

 

Thanks

1 Reply

@geekcode0315 What exactly you want to do with the validation? Do you want to do it via Power Apps only or are you fine with SharePoint default suggestions as well?

 

You can directly apply the validation in SharePoint list validation settings as well without customizing the list form using Power Apps.

 

Use list validation formula like: 

 

=DATEVALUE([End Date])>=DATEVALUE([Start Date])

 

Note

  1. Sometimes comma( , ) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon( ; ) instead of comma( , ).
  2. Use correct display name of your SharePoint columns in above formula.
  3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name]

Steps to add list validation settings at: How to have validation for SharePoint list columns? 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.