How do i subtract dates?? See i would like to do it for an employees contact. If the contract expires dat is in the program makes a calculation to take awat the expiry date from the current date and says how long is left. How do i do that?
read documentation on java.util.Date and java.util.Calendar
ok so. this is what i want to do:
u type in the contract expire date in a textfield.
then i want to be able to subtract that from the current date and show that answer .
get the user input from textfield
then convert that to a date by using SimpleDateFormat
now follow the steps in my previous response
wat u mean by simpledateformat? How do u convert it like that?
Do u have an example?
Contract expiry Date: 05/05/07
How do i get contract left?
Calendar endTime = Calendar.getInstance();
// Difference of Time in Minutes AND Conversion Milli-Seconds to Minutes
int diffMins = (int) (( endTime.getTimeInMillis() -