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?
1. create 2 date objects a current date and a contract expiration one.
2. get time in milli seconds from both date objects
3. subtract
4. and convert the remainder to days, months and years etc
read documentation on java.util.Date and java.util.Calendar
at java.sun.com
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 .
HOW?
get the user input from textfield
textField.getText()l
then convert that to a date by using SimpleDateFormat
now follow the steps in my previous response
Bookmarks