Reference > TDBDateX Object > TDBDateX Object Methods > Match Method (TDBDateX) |
Match Method (TDBDateX)
The Match method compares the two dates and returns the detail matching results. It is much more efficient and easier to call the Compare method when comparing if all intervals match or not.
object.Match ([Date1], Date2)
date1 is an optional Variant (Date): the first date you want to use to compare. If not specified, Value property will be applied.
date2 is a required Variant (Date): the second date you want to use to compare.
The sum of one or more of these values:
0 |
None matched |
1 |
Second |
2 |
Minutes |
4 |
Hour |
8 |
Day |
16 |
Month |
32 |
Year |
64 |
All matched |
If the year part for date1 and date2 is omitted, Match uses the current year from your system date.
If the date part for date1 or date2 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 date1 or date2 is set to Null, this method returns -1. If date1 is not specified, the date set in the Value property will be applied to the first date for comparing.
See Also