Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to compare the dates

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
0
0
CA
Hi,

I wonder if anyone knows how to compare the dates. What I need to is the following:

I need to count difference in number of months from the start date to the current month.

Suppose, my start date was April 2002 and the current date is May 2003, then I need to come up with the number 15 as a difference between these two months.

Please help

Thanks.
 
You have two possibilities. One is using Formula language, with the simple sustraction of two date/time fields. Note that the result is in seconds, so calculate accordingly.
The other solution is to use LotusScript. Create two NotesDateTime items and use the TimeDifference method.
You'll find all the info you need in the Designer Help.
 
One easy way of comparing dates is using formula language ,
try out this formula

@Month(@Now)-(@Month(@Created))

Hope this Helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top