[Overview][Constants][Procedures and functions][Index] Reference for unit 'DateUtils' (#rtl)

DateTimeInRange

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

Declaration

Source position: dateutil.inc line 367

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: Jun 23 2021