Dim dateTime As New NotesDateTime( "04/16/96 05:36 PM" )
Messagebox( dateTime.GMTTime )
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim report As NotesDocument
Dim reportBody As NotesRichTextItem
Dim item As NotesItem
Dim dateTime As NotesDateTime
Set db = session.CurrentDatabase
Set collection = db.FTSearch("GMTTime",0)
Set doc = Collection.GetFirstdocument()
Set report = New NotesDocument( db )
Set reportBody = New NotesRichTextItem( report, "Body" )
report.Form = "Branch Office Report"
While Not(doc Is Nothing)
Set item = doc.GetFirstItem( "PostedDate" )
Set dateTime = item.DateTimeValue
Call reportBody.AppendText( dateTime.GMTTime )
Call reportBody.AppendText( " " )
Call reportBody.AppendText( doc.Event( 0 ) )
Call reportBody.AddNewLine( 1 )
Set doc = collection.GetNextDocument(doc)
Wend
Call report.Save( True, True )
End Sub
例えば、コレクションに 3 つの文書があり、それぞれがグリニッジ標準時、太平洋標準時、中部標準時で作成されている場合、報告書の本文は次のようになります。
08/06/95 06:12:14 PM GMT London office posts results
08/06/95 06:17:11 PM GMT San Francisco office obtains proposal
08/06/95 08:50:58 PM GMT Chicago office receives sketches