I tried to solve this problem myself, but maybe I donโt understand something about how ArrayUnique works.
Here is a sample LotusScript code:
'Let test some dates dateOne = CDat("12/16/2010") dateTwo = CDat("12/16/2010") testSuccess = (dateOne = dateTwo) 'On evaluation, testSuccess = true 'Now let make an array ... Dim someArray(1) As Variant someArray(0) = dateOne someArray(1) = dateTwo uniqueArray = ArrayUnique(someArray) 'uniqueArray has the same two elements ... the duplicate hasn't been removed
In the above example, dateOne, dateTwo, testSuccess, and uniqueArray are implicitly declared variant variables.
What am I doing wrong? I read in the help system where it says:
Using
Elements in an alternative array will only compare if they are of the same type. The variant array cannot contain classes or objects.
Array elements containing a null value will correspond to other null values.
Array elements that are empty will match other empty elements.
Well, the array of variants in this example contains variant variables that have a date / time type. So, if I read this correctly, I am not mistaken.
Edit: On Forum Notes, user Thoams Kennedy tried the following:
If you specified a time component like this
dateOne = CDat ("12/16/2010 04:20:17 AM")
dateTwo = CDat ("12/16/2010 04:20:17 AM")
he will still treat them as a separate one. There seems to be no millisecond component, so I would say that ArrayUnique does not know how to deal with DateTime variants.
Therefore, its conclusion is that ArrayUnique umm is not working.