Hi all,
I’m currently in last phase before going berserk over not finding the problem of my db search query.
Here is the code:
Dim dateOutdated As New NotesDateTime("")
Call dateOutdated.Setnow
Call dateOutdated.AdjustDay(-2)
' search db with date limitation!
' THIS DOESNT WORK. if print searchFormula, i get empty string.
searchFormula$ = {Form = "AllNodes" & ([NodeUpdatedDate] < "} & dateOutdated.Dateonly & {" or NodeDaysSinceLastAccess > 1)}
' THIS DOESN'T WORK EITHER. says "type missmatch"
' dateOutdated defined as DateTime
' NodeUpdatedDate is field type "Date/Time"
searchFormula$ = {Form = "AllNodes" & ([NodeUpdatedDate] < "} & dateOutdated & {" or NodeDaysSinceLastAccess > 1)}
I tried next things too:
-
CDat(dateOutdated) - type missmatch
-
Format(dateOutdated, “General Time”) - blank search string
-
dateOutdated.DateOnly - no results (should find at least 2 documents)
-
dateOutdate.ZoneTime - no results
-
using quotes on time or not doesnt help either.
BUT, if i do only:
searchFormula$ = {Form = “AllNodes” & NodeDaysSinceLastAccess > 1}
OR
'searchFormula$ = {Form = “AllNodes” & NodeUpdatedDate < [} & dateOutdated.Zonetime & {]}
both work. i just want to merge those two search strings into one?
can someone please help me out here… i’m really losing my mind. Thank you!