The problem is for Java
I want to take time input as follows
12:00 AM 11:42 PM
There will be a sequence of such inputs up to N lines.
Here two different Time Inputs are given
1)12:00 AM
2)11:42 PM
but they are in the same line.
The time inputs are for a single person entering(12:00 AM) and leaving(11:42 PM)
I know SimpleDateFormat but I can't modify it to suit my needs as said.
So please help
There is lots of ways of doing this. I would use Regular Expression.
This gives you two strings
amandpm.Then you can use
SimpleDateFormatto parse them asDate.