Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Difference in hours between two dates

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#HoursDifferent or http://www.notesninjas.com/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.

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Lotus Notes 5 All-in-one Certification Exam Guide by Libby Schwarz, Ben Malekzadeh
Sort out your CLP with this book.
See at: Amazon.co.uk | Amazon.com |