File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Date Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Date" Watch "Date" New topic
Author

Date

Ira Jain
Ranch Hand

Joined: Sep 06, 2000
Posts: 70
Hi,
I just wanted to know if we have a method which computes the difference between two dates or do we write a program for the same.I did try to look up in JDK documentation but could not find.
Will be obliged if somebody could help me.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Ira,
I poked around in some books and the API and finally worked something out. It was easier when all you needed was the Date class but it's methods are deprecated now

Hope that helps.
------------------
Jane
[This message has been edited by Jane Griscti (edited October 19, 2000).]


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
star
Greenhorn

Joined: Oct 19, 2000
Posts: 1
Here is a small program that calculates the differece between two dates. You can use Calendare class instead of Date as well.

I added some UBB code here. -Mapraputa
[This message has been edited by Mapraputa Is (edited October 19, 2000).]
Ira Jain
Ranch Hand

Joined: Sep 06, 2000
Posts: 70
Thanks a lot for your helpful codes.I was just trying to avoid writing code to do the same
 
 
subject: Date
 
Threads others viewed
Could not find the main class: com.sun.tools.javac.Main.
Nananana
indexOf() error
assign a bean value to a string
Need Help with check box values!
developer file tools