Write a function that takes as input a string that stores date and time (24-hour clock) in the following format:
“MM/DD/YYYY HR:MIN:SEC” and prints the following:
• DD/MM/YYYY
• HR:MIN:SEC
• MM/YYYY
• Whether the time is a.m. or p.m.
Validation of the input in the function is necessary. For example, if the user gives an input of “122/04/1990 13:12:12”, the given string is invalid, as there can be only 12 months in a year. Think of all possible erroneous inputs and write code to handle them. The function doesn’t return anything.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.