logo
search
SharePoint Document Issues

How to Validate a 15-Minute Difference Between SharePoint Time Columns

Tauseeq MagsiTauseeq Magsi Sep 25, 2026 869 views

Question details

The user needs to enforce a minimum 15-minute time difference between a 'TimeFrom' and 'TimeTo' column within a SharePoint approval process and display a custom error message when the criteria are not met.

How to Validate a 15-Minute Difference Between SharePoint Time Columns
Product
SharePoint / Microsoft Power Apps
Device & OS
not provided
Scenario
Submitting a SharePoint list form for an approval process where a minimum time duration must be met.
Observed behavior
SharePoint's built-in column validation does not natively support calculating precise minute differences between time columns, allowing invalid form submissions without intervention.
Before you start

Ensure you have the appropriate site permissions to customize your SharePoint list form using Microsoft Power Apps, as standard list settings cannot handle this calculation.

Solution 1Recommended

Customize the SharePoint Form with Power Apps

Since SharePoint's out-of-the-box validation lacks advanced time comparison functions, customizing the list form using Power Apps is the recommended approach to calculate the difference and block invalid submissions.

Power Apps provides the DateDiff function, which easily calculates the exact minute difference between two time values. By modifying the Submit button's behavior, you can halt the submission and display your custom notification message.

1
Open Power Apps Integration

Navigate to your SharePoint list, click on 'Integrate' in the top menu bar, hover over 'Power Apps', and select 'Customize forms'.

2
Select the Submit Action

In the Power Apps Studio, locate the button used to save the form (often a checkmark icon or a custom 'Submit' button) and select its 'OnSelect' property from the formula bar.

3
Add the DateDiff Validation Formula

Replace the default SubmitForm function with a conditional statement using DateDiff. For example: If(DateDiff(DataCardValue_TimeFrom.SelectedDate, DataCardValue_TimeTo.SelectedDate, Minutes) < 15, Notify("Please submit a ticket with at least a 15-minute time difference.", NotificationType.Error), SubmitForm(SharePointForm1)).

4
Save and Publish

Click 'File', choose 'Save', and then click 'Publish to SharePoint'. Navigate back to your SharePoint list to test the new validation rule.

Customize the SharePoint Form with Power Apps
Need Formula Assistance?: If you encounter syntax errors or need further customization for your specific column names, the Microsoft Power Platform Community is an excellent resource for troubleshooting.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

While SharePoint handles complex list approvals, WPS Office is an excellent, lightweight alternative for creating and editing the actual documents attached to those workflows. Enjoy seamless Microsoft Office format compatibility for free.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free office suite on your desktop or mobile device.
  2. 2. Open Your Documents: Easily open your Microsoft Office files directly in WPS Office without losing any formatting or layout details.
  3. 3. Edit and Collaborate: Use the familiar tabbed interface to modify your documents and prepare them for your SharePoint workflows.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Free and lightweight, ensuring fast performance on any device or operating system.Familiar user interface with zero learning curve for seamless migration.Includes powerful PDF editing and document conversion tools built right in.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use SharePoint's default column validation for time differences?

No, SharePoint's out-of-the-box column validation formulas do not reliably support calculating the minute difference between two Date/Time columns. Power Apps is required for this level of customization.

What function calculates time differences in Power Apps?

The DateDiff function is used in Power Apps. You can specify the unit, such as 'Minutes', to calculate the exact duration between a 'TimeFrom' and 'TimeTo' value.

How do I prevent a form from submitting if the time difference is too short?

You can conditionally block submission by checking your DateDiff criteria in the 'OnSelect' property of the Submit button. If the 15-minute criteria fails, skip the SubmitForm() function and use the Notify() function to alert the user instead.

Will this Power Apps customization affect users on mobile devices?

No, once you customize the SharePoint list form with Power Apps and publish it, the custom form and its validation rules will work seamlessly across both desktop browsers and the SharePoint mobile app.