Home > Domino Tips > Administrator > Database > Difference Between Two Dates
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE

Difference Between Two Dates


Benny Beronda
03.03.2000
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


The following formula will allow you find the difference between two dates on a
document. This formula was used in a column with @Modified & @Created but
substituting different Date/Time field names or @Functions for those values
below will allow it to be used for any two dates.

Code

temp := ((@Modified - @Created)/60)/60;
temphours := @Left(@Text(temp); ".");
tempminutes := @Left(@Right(@Text(temp); "."); 2);
tempdays := @TextToNumber(temphours)/24;
temphours2 := @Left(@Right(@Text(tempdays); "."); 2);
hrspercent := @TextToNumber(temphours2)/100;
hours := 24 * hrspercent;
days := @Left(@Text(tempdays); ".");
percent := @TextToNumber(tempminutes)/100;
minutes := 60 * percent;
@If(days = ""; "0 days, " ;@Text(days) + " days, ") +
@If(hours = ""; "0 hours, "; @Text(@Round(hours)) + " hours ") + @If(minutes =
""; "0 minutes";@Text(minutes) + " minutes")


This column formula will result in a message being displayed in a format
similar to this example.
Example: 5 days 10 hours 37.5 minutes

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Database
Quickly scan all databases on a Lotus Domino server
LotusScript code rebuilds corrupted busytime.nsf file
How to move Notes databases off Domino 8 servers and save disk space
Top 10 Lotus Notes/Domino administration tips of 2008
Batch file runs scheduled Lotus Notes database maintenance tasks
Fix and update Lotus Notes documents with limited access
Programmatically replace the design of Lotus Notes databases
Add a program doc to compact Lotus Notes databases automatically
More efficient local Lotus Notes database replication
Remove orphaned Lotus Notes documents on Domino databases with a 'virtual delete'

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts