'this code uses a document date field to create a long date format
'if the date field is not present or badly formed the document.created property is used
dim niPubDate as notesitem
dim ndt as notesdatetime
dim lslocaltime as variant
Set niPubDate = doc.getfirstitem("DocCreated")
If Not(niPubDate Is Nothing) Then
Set ndt = niPubDate.datetimevalue
If ndt Is Nothing Then
lslocaltime = doc.created
Else
lsLocalTime =ndt.lslocaltime
End If
Else
'use default doc.created
lslocaltime = doc.created
End If
Print "RSS type date:" & dow(Weekday(lsLocalTime)) & ", " & Day(lsLocalTime) & " " & _
mon(Month(lsLocalTime)) & " " & Right(Cstr(Year(lsLocalTime)),2) & _
" " & Right("0" & Hour(lsLocalTime),2) & ":" & Right("0" & Minute(lsLocalTime),2) & _
":" & Right("0" & Second(lsLocalTime),2) & " GMT"