How can I change the time without turning it into a string object (which dt.strftime does)? Like if I want to turn (default time format and time object)%H:%M:%S into %I:%M:%S %p or turn %H:%M:99(Default under time column in csv file data) into %H:%M:00?
Strftime helps resolve the problem, but it also results in data conversion (from datetime format to a string format) as per my instructor.
Changing 59 seconds to 00 seconds is changing the value of
seconds, for this use.replace(seconds=0).Changing the 24-hour clock to a 12-hour clock with am/pm is not a
timeobject property, it's only a display format (when convertingtimeto a string).