Please help me I m developing screen for login where I mentioned to give login time in AM and PM.I m using spinner to enter time and calculating the time but there is some problem.
I m using simpleDateFormat class constructor("HH:mm:ss") but not getting d difference.
Please help me to get time difference b/w two time inputs like 10.05AM and 8.05PM.
In pseudo code
1) Obtain the Date object for the two time inputs (Check the Simple/DateFormat class for methods which will parse the string format and provide you a date object)
2) Obtain the time long value
3) Compute timeValue1-timeValue2 to obtain the difference. Result will indicate long milliseconds
4) Divide result to obtain seconds,minutes,hours