This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes days between dates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "days between dates" Watch "days between dates" New topic

days between dates

t tea

Joined: Mar 03, 2003
Posts: 10
How can i calcuate the days between two dates?
For example days bewteen 2003-03-02 to 2003-03-29 .
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Search this FAQ for "days between". Disclaimer: I have not used or tested the code here. Use at your own risk.
BTW please review the JavaRanch Naming Policy. If you are using your "real" name, then I apologise in advance.
[ March 22, 2003: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: days between dates
It's not a secret anymore!