This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Difference between 2 date in day Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Difference between 2 date in day" Watch "Difference between 2 date in day" New topic

Difference between 2 date in day

amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
I need to calculate difference between 2 date in number of days .for e.g.
say one date is 1-mar-2007 11:59PM and another is 2-mar-2007 0:1AM
the it should give 1
Ibrahim AlShehri

Joined: Jan 29, 2007
Posts: 12
i wrote this method and i hope you find it useful

[ March 02, 2007: Message edited by: Ibrahim AlShehri ]

SCJP 5.0 (87%)
GeeCON Prague 2014
subject: Difference between 2 date in day