im trying to search against the modifytimestamp attribute but would
like to search between specific dates. every time i try to search i
get a "filter error" and it because of the modifytimestamp and how i
am using the value. how exactly should i throw it together
(&(objectcategory=person)(objectclass=user)(modifyTimeStamp=?????))
i want to search for say between two dates example: june8 - jun15
using the follow attribute.
You can use the operators ">=" or "<=" but not ">" or "<". For example
(watch line wrapping, this is one line):
(&(objectCategory=person)(objectClass=user)(modifyTimeStamp>=20080608000000.0Z)(modifyTimeStamp<=20080615000000.0Z))
Note that GeneralizedTime attributes, like modifyTimeStamp, require the
format yyyymmddhhmmss.0Z for date/times in UTC. If you want to specify the
time in your time zone and your time zone bias is +200, then you can use:
(&(objectCategory=person)(objectClass=user)(modifyTimeStamp>=20080608000000.0+0200)(modifyTimeStamp<=20080615000000.0+0200))
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Interesting. I just noticed this. Hmmm
I guess i can use the above lday query with the whenChanged attribute
to accomplish this since this attributed is replicated.
-------------
Hmmm. I see modifyTimeStamp as replicated, but whenChanged is not (by
default). However, modifyTimeStamp is operational (sometimes called
constructed), so the value won't be in the property cache. However, I find
this doesn't matter if you use ADO in VBScript or adfind. I just tested with
adfind and it seems to work fine.