OpenNTF.org - returns a date the document/em
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
Edit Document Code By Date > Code Document
About This Code
Brief Description:
returns a date the document/email should be considered created 
Rating:
Not Rated Yet 
Contributor:
Mike Mortin 
Category:
Lotusscript 
Type:
Date/Time functions 
Notes Version:
R6.x, R8.x, R7.x 
Last Modified:
03 Nov 2008 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
Public Function GetEmailCreatedDate(doc As NotesDocument) As String

' returns a date the document/email should be considered created
' posted to http://www.openntf.org/projects/codebin/codebin.nsf/CodeBySubCategory/1D9C645C986EAF74862574EF0061CBBB
' written by Mike Mortin 20080625
If doc.DeliveredDate(0) <> "" Then
GetEmailCreatedDate = doc.DeliveredDate(0)
Elseif doc.PostedDate(0) <> "" Then
GetEmailCreatedDate = doc.PostedDate(0)
Else
GetEmailCreatedDate = doc.Created
End If
End Function

Usage / Example
Sub Initialize
Dim s as New NotesSession
Dim created as String

created = s.DocumentContext

MsgBox "This emailwas created on " & created
End Sub
 Comments

No documents found

 Add your comment!