2017-05-31 49 views
1

我想在NOtesDatabase的搜索方法的搜索公式中使用NotesDateTime對象。下面是我的代碼如何在NotesDatabase的Search方法的搜索公式中使用lotusscript NotesDateTime對象?

Dim searchFormula5 As String 
Dim modifiedAfter As New NotesDateTime("10/10/2010") 
searchFormula5$= {PaPeriodEnd<@Today & PaPeriodEnd > modifiedAfter & PaStatus=Signed } 
Set collectionDocs=database1.Search(searchFormula5$,NOTHING,0) 

我不能夠在搜索公式使用modifiedAfter。 PaPeriodEnd是數據庫中文檔中的日期項目。

回答

1

嘗試 searchFormula5$ = {PaPeriodEnd < @Today & PaPeriodEnd > [10/10/2010] & PaStatus = Signed}

+0

或者,如果使用的是該對象,因爲它實際上是一個可變值, 然後使用{searchFormula5 $ = {PaPeriodEnd <@Today&PaPeriodEnd>} + modifiedAfter.DateOnly()+ {&PaStatus =簽名} –

+0

modifiedAfter是變量,這就是爲什麼我必須使用該對象。我找到了解決方案。幾乎沒有變化,與您的解決方案相同'searchFormula5 $ = {PaPeriodEnd <@Today&(PaPeriodEnd> @TextToTime(「}&modifiedAfter.DateOnly()&{」))&PaStatus =「簽名」}' –

+0

謝謝!!!!! –

相關問題