The trouble isn't in the padding, it's actually in your formatting call. Note the capitalization of minutes (M) vs months (m), you used (m) for both. (documentation here).
Demonstration of working code is below
pd.to_datetime(df.TimeStamp, format="%m/%d/%y %H:%m")
should be
pd.to_datetime(df.TimeStamp, format="%M/%d/%y %H:%m")
import pandas as pd
times = [
"3/31/22 23:30",
"3/31/22 23:45",
"4/1/22 0:00",
"4/1/22 0:15"
]
df = pd.DataFrame(times, columns=['TimeStamp'])
pd.to_datetime(df.TimeStamp, format="%m/%d/%y %H:%M")
>> 0 2022-03-31 23:30:00
>> 1 2022-03-31 23:45:00
>> 2 2022-04-01 00:00:00
>> 3 2022-04-01 00:15:00
>> Name: TimeStamp, dtype: datetime64[ns]
That said, if anyone lands here looking for the solution to the zero-padding, the hash/dash trick is worth further reading (though it does not work in many circumstances)