For example i have a string about time like 134058 (hhmmss). What is the best way to parse and handle this data? I think i can do this with strncmp or some loops but i am not sure if it's the logical or efficant way.

And what kind of data type should i keep these variable with?