Date has a constructor taking a long argument which is the number of milliseconds sinse 1.1.1970 (see javadoc). And if you have a Date X where you want to subtract 1 day, then its: oldDate in millis - 1000 * 60 * 60 * 24
make sure the multiplication does not exceed the int range!
Joined: Apr 27, 2006
I want to do this stuff in the java script .Can you please advice me how to do it?.