ComponentOne True DBInput Pro 8.0
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.

Syntax

object.Match ([Date1], Date2)

Arguments

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.

Return Value

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

Remarks

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

Compare Method (TDBDateX)

InRange Method (TDBDateX)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback