Unit 'DateUtils' Package
[Overview][Constants][Classes][Procedures and functions][Index] [#rtl]

DateTimeInRange

Checks whether a date/time value is in a given range.

Declaration

Source position: dateutil.inc line 389

function DateTimeInRange(

  ADateTime: TDateTime;

  AStartDateTime: TDateTime;

  AEndDateTime: TDateTime;

  aInclusive: Boolean = True

):Boolean;

Description

DateTimeInRange checks whether the value ADateTime lies between AStartDateTime and AEndDateTime, and returns True if it is. When AInclusive is True (the default), then the limits are included. When AInclusive is False, the limits are excluded.

Errors

The AStartDateTime value must be before AEndDateTime, but no check is performed.

See also

DateInRange

  

Checks whether a date value is in a given rang.

TimeInRange

  

Checks whether a time value is in a given range.


Documentation generated on: Nov 23 2024