The characters have largely been addressed by other people, though I will point out an additional aspect to consider. First, I'm addressing the choice of YYMMDD, which has two problems.
The first problem with YYMMDD is that it won't work for historic data. It will sort 1997 long after 2035, instead of before. Whether that's an issue may be dependant on how widespread you want to propagate the format.
The other issue with YYMMDD relates to the calendar reliance. While the Gregorian calendar is now the most popular one in the world, not everyone uses it or is aware of the day in its reference. Fortunately, the Gregorian year is generally known and accepted, even by those who use different years, but the month/day nomenclature can be meaningless. To be more portable, a format of
YYYYDDD
where DDD is the day in the year, is more portable. However, for those of us who use the Gregorian calendar that is difficult because we generally are not aware of the day of the year. The MMDD format still is sortable, even if it means nothing to an individual, who themselves might create a date like 20221442 (Gregorian year and their month and day) or 20220047 (Gregorian February 16, the 47th day of the year), thinking they are complying with your format.
Continuing the theme of how widespread the format is to be used, a consideration needs to be made for the characters available around the world. The short dash '-' is available everywhere (?) because it is the minus sign, used globally. Underscore is more of a problem, even for some who use the Latin alphabet. They can normally get to it one way or another but it is not on every keyboard. In some alphabets, the underscore is a character or character modifier, so makes confusion. In many Persian languages, the underscore would be read as a kasheeda. In many alphabets, what we use an underscore for, they would use an overline: something hard to get on our keyboards. Most of the keyboards for technical people have the simple latin alphabet available on them (sometimes on the side of the key), so they can type the letters. But not always the underscore.