Tuesday, October 27, 2009

Format date in Lotus script

Below post helped me to format date in Lotus script

http://www.joelitton.net/A559B2/home.nsf/d6plinks/JLIN-5UU4B2

I made changes to the code and below code will format the date value in a field of document.

Dim session As New NotesSession
Dim dateTime As NotesDateTime
Set dateTime = session.CreateDateTime ( deliveredDate )
print " : " & Cstr(dateTime.LocalTime ) & " GMT Time :" & Cstr(dateTime.GMTTime)

Dim dtGMT As NotesDateTime
Dim strRSSDate As String

Set dtGMT = New NotesDateTime( Left$(dateTime.LocalTime , 22) )
strRSSDate = Format$(dtGMT.LSLocalTime, "dd-mmm-yyyy hh:mm:ss AM/PM")

No comments:

Post a Comment