Ну ... есть крошечная, крошечная вероятность того, что время между полуночными часами между операциями в этом процессе будет тикать, и это может отбросить результат ... Но что-то вроде этого должно сработать:
dim currentDT as new NotesDateTime
dim currentDayMidnight as new NotesDateTime("Today 12:00 AM") ' Doc says you can do this, although I never have!
dim isInRange as boolean
isInRange = false
call currentDT.setNow()
' check if current time is within 3 hours of midnight
if currentDT.TimeDifference(currentDayMidnight) <= (3 * 60 * 60) then
isInRange = true
end if