Using Format$ with NotesDateTime Objects
The mission: Create a string containing a date and time, formatted according to RFC 1123 (see also RFC 2616) using Lotusscript.
This cost me half a day as I couldn’t figure out what was wrong with my code. Eventually, I got it. If you want to create a String using Format$ and a NotesDateTime object, you have to pass Format the LSGMTTime attribute and NOT the GMTTime. ARGL!!!
Dim expiresDT As New NotesDateTime( "Today 02:30:00" )
expiresString = Format$ ( expiresDT.LSGMTTime , "ddd, dd mmm yyyy hh:mm:ss") & " GMT"
The code above creates a RFC 1123 compliant timestring. @SetHTTPHeader does this automatically, unfortunately this function is not exposed in the NotesDateTime object.
Tagged as: date, Domino, format, ibm, Lotus, Notes, RFC 1123
, Show-n-tell thursday, SnTT | Author: Martin Leyrer
[Donnerstag, 20080529, 13:15 | permanent link | 0 Kommentar(e)