Skip to main content
Validation Rule: Timespan Validation

#EN #Excel #Validation #1.107

Updated over 2 years ago

Validation rule to use

Use the following sentences to make a timespan field invalid when a limit is reached:

  • Invalid when lesser than DDD.HH:MM

  • Invalid when greater than DDD.HH:MM

  • Invalid when between DDD.HH:MM and DDD.HH:MM

  • Invalid when not between DDD.HH:MM and DDD.HH:MM

Description of the validation

The comparison can be done using 4 parameters:

  • DDD: Days (up to 999)

  • HH: Hours (up to 23)

  • MM: Minutes (up to 59)

Important notes

  • You don't have to use the days.
    The accepted format is either DDD.HH:MM, or simply HH:MM;

  • Days and hours are separated by a dot ("."), but hours, minutes and seconds are separated by a colon (":");

  • You need to use zeros in the parameters you don't use to use an accepted format.
    Example: 5 minutes = 00:05 or 0.00:05;

  • 24:00:00 is not accepted and is not worth a day;

  • 00:60:00 is not accepted and is not worth an hour.

Validation rules available

Invalid when lesser than DDD.HH:MM

Allows to set a field as invalid when its value is lesser than a limit.

Alternative rules:

  • Invalid when greater than DDD.HH:MM

Invalid when not between DDD.HH:MM and DDD.HH:MM

Allows to set a field as invalid when its value is not between two limits.

Alternative rules:

  • Invalid when between DDD.HH:MM and DDD.HH:MM

Keywords available with this validation rule

Did this answer your question?