Reference > TDBDateX Object > TDBDateX Object Methods > InRange Method (TDBDateX) |
InRange Method (TDBDateX)
You can use the InRange method to determine whether a specific date value is within an appropriate range. This is very effective when working with dates for range checking to determine various conditions.
object.InRange ([Date], StartDate, EndDate)
date is an optional Variant (Date) value for range checking. If not specified, the date set in the Value property will be applied.
startdate, enddate are required Variants (Dates: two date times you want to use to set a range.)
True if the date is in range, False otherwise.
If the year part for date, startdate and enddate is omitted, InRange uses the current year from your system date.
If the date part for date, startdate, or enddate is omitted, the date serial will be set to 0, which equals to Dec. 30, 1899. If the time part is omitted, the time serial will be also set to 0, which equals to 00:00:00.
If either date, startdate, or enddate is set to Null, this method returns False. If date is not specified, the date set in the Value property will be applied for the underlying value.
See Also