< Back

Document Subject: Difference in hours between two dates
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#HoursDifferent or http://A555F9/nn.nsf/ByAlias/HoursDifferent

How do you work out the difference in hours between 2 dates or notesdatetime fields?




Use timedoubledifference in lotusscript

hoursdiff= A.timedifferencedouble(B) / 3600
'where A and B are notesdatetimes
'read timedifferencedouble as minus so if
'B is later than A it will be minus figure

in @formula try:
num:=@if(@text(B)="" | @text(A)=""0;A-B/3600);

 

 

See

http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/NotesDateTime

for more notesdatetime tips.