im working on a small program and i want to ask the user about departure time and arrival time now what would be the best way to get the time? and by that i mean can i ask the user to enter time like this.... 1AM or 1am. or ofc 1pm or 1PM.
cause i cant really think of a data type other than a string to store that. and if i do use a string for it then how will i do error checking on it?.
Also one more thing how will i keep a 2 hour difference between departure time and arrival time?