I've got a profile that I created that has a property called
Expiration Date, which is a date type. I'm trying to compare the
document's Expiration Date with a point in time
90 days from the present. Here is the query in my VB app:
sSQL = "SELECT ""DAV:creationdate"", ""urn:schemas-microsoft-
com:office:office#Effective Date"", ""urn:schemas-microsoft-
com:office:office#Expiration
Date"", ""DAV:displayname"", ""DAV:href"" "
sSQL = sSQL & "FROM SCOPE('DEEP TRAVERSAL
OF ""http://ntsloan01/environmental/documents/"" ') "
sSQL = sSQL & "WHERE ""DAV:contentclass"" = 'urn:content-
classes:Permit' "
sSQL = sSQL & "AND ""urn:schemas-microsoft-
com:office:office#Expiration Date"" >=DATEADD(DAY, 90, GETGMTDATE())"
This isn't working, however. I keeps erroring out, and it's because
of the last line of the SQL statement. Has anyone done something
similar that actually works?