A minute ago you said you wanted to make the user enter the time as (hh:mm:ss) , but now you've changed your mind and you want to convert time from some other system into hh:mm:ss?
You need to work out now, before you start coding, what you want to do. I suggest you literally write down something like:
1) Ask user for input
2) Get user input
3) Check user input is in correct format - if not, go back to 1
This is the difficultly in coding. Working out how to solve the actual problem. The rest is just syntax. So first, work out what the problem is, and then work out how to solve it. Only then should you start code.