No question, I just wanted to point this out for anyone doing R5 to R6 migrations.
NotesDateTime.LocalTime seems to have some peculiar differences between R5 and R6.
I’ve seen a few others posted in this forum, but I did not find one that pointed this out:
If you have a NotesDateTime object, set to a null value (for instance, using .SetAnyDate() and .SetAnyTime()), the LocalTime property will return a different DATA TYPE in R5 than in R6.
For Instance:
Dim NDT as NotesDateTime
Set NDT = New NotesDateTime(“”)
Call NDT.SetAnyDate()
Call NDT.SetAnyTime()
Msgbox TYPENAME(NDT.LocalTime)
Will prompt ‘EMPTY’ in R5, but will prompt with ‘STRING’ in R6.
I had an issue today, where one of my old db’s came back to haunt me.
I had been checking the condition of:
If IsEmpty(NDT.LocalTime) Then…
One of the clients that uses this db just upgraded to R6, and was getting strange results.
At the time, I couldn’t use NDT.LocalTime = “”, because comparing EMPTY to “” returns false. So would IsNull().
If you really MUST compare the LocalTime property of a NotesDateTime (though you should find a different way!), and you must do this in a mixed environment, I found that you can use:
If(Format$(NDT.LocalTime, “mm/dd/yyyy”) = “”) then…