I am trying to do a between clause but it is not working, where am i going
wrong?
TheScope = "('deep traversal of
""http://myserver/exchange/folder/inbox/""')"
SelectSQL = " ""DAV:displayname"", " & _
" ""urn:schemas:httpmail:datereceived""," & _
" ""urn:schemas:httpmail:displaycc""," & _
" ""urn:schemas:httpmail:displayto""," & _
" ""urn:schemas:httpmail:fromemail""," & _
" ""urn:schemas:mailheader:received""," & _
" ""urn:schemas:httpmail:sendername""," & _
" ""urn:schemas:mailheader:subject""," & _
" ""urn:schemas:httpmail:textdescription""," & _
" ""urn:schemas:httpmail:htmldescription"" "
Dim DateRng1
Dim DateRng2
DateRng1 = " >= CAST(""2005-04-20T18:29:00.925Z"" as 'dateTime')"
DateRng2 = " <= CAST(""2005-04-20T18:29:23.925Z"" as 'dateTime')"
' Build the SQL query.
strQuery = "<?xml version=""1.0""?> <D:searchrequest xmlns:D =
""DAV:"" > " & _
"<D:sql>SELECT " & SelectSQL & " FROM " & _
"SCOPE" & TheScope & _
"where " & _
" ""urn:schemas:httpmail:datereceived"" " & DateRng1 & _
"and ""urn:schemas:httpmail:datereceived"" " & DateRng2 & _
"</D:sql></D:searchrequest>"