Using Format$ with NotesDateTime Objects
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.