How to use time in java
i have a table where i am supposed to record time in and time out and then later am suppused to do calculations on this time.
How can i make he java program to recognise time during calculation
For example i want the user to input time in this form(HH:MM) ,14:20, 6:30....
How can i add and subtract time?
With a regular expression you can seperate the hours from the minutes.
Then you can multiply the hours with 60 and add the minutes.
With the total number of minutes you can do calculations.
Thanks alot for the reply.
Originally Posted by bubbless
But i still have one more question,after the calculations i want to display the final result in HH:MM formart.How can i achieve this?
Whats the result of your calculations?