如果当前时间在00.00到03.00 AM之间,lotusscript是否可以将布尔值设为true?
答案 0 :(得分:2)
嗯...在此过程中,两次操作之间的午夜时间间隔很小,这可能会产生结果。但是,类似这样的事情应该可以解决:
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
答案 1 :(得分:1)
是。
看一下notesdatetime类及其timedifference / timedifferencedouble函数。