If they were stored as characters you could still do a string comparison using greater than and less than signs and logic.
"202201010001" > "202112122359"
evaluates to True in Python, SQL and many other languages.
"202201010001" > "202112122359"
evaluates to True in Python, SQL and many other languages.
Plus if they weren’t then even numerical comparisons would fail eg 1012021 (Oct/1/2021) < 5102020 (May/10/2020) so you argument is moot.
"%04d%02d%02d" % (999,1,1)