Option Public Option Declare Sub Initialize %REM Create and populate 'rssStoryDate' field for each selected document. Existing 'StoryDate' field is formatted according to ISO 8601 standard (detailed at http://www.w3.org/TR/NOTE-datetime). Formatted date is stored in 'rssStoryDate' field. %END REM Dim session As New NotesSession Dim db As NotesDatabase Dim dc As NotesDocumentCollection Dim doc As NotesDocument Dim dtLocal As NotesDateTime Dim dtGMT As NotesDateTime Set db = session.CurrentDatabase Set dc = db.UnprocessedDocuments Set doc = dc.GetFirstDocument Do While Not (doc Is Nothing) If doc.HasItem("StoryDate") Then Set dtLocal = New NotesDateTime( doc.GetFirstItem("StoryDate").Text ) Set dtGMT = New NotesDateTime( Left$(dtLocal.GMTTime, 22) ) doc.rssStoryDate = Format$(dtGMT.LSLocalTime, "yyyy-mm-ddThh:nn:ssZ") Call doc.Save( True, True ) End If Set doc = dc.GetNextDocument( doc ) Loop End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.