TLDR: This is not a question about how to change the way a date is converted to a string, but how to convert between the two format types - This being "%Y" and "YYYY", the first having a % and the second having 4 x Y.
I have the following date format "%Y-%M-%D" that is used throughout an app. I now need to use this within a openpyxl NamedStyle as the number_format option. I cant use it directly as it doesn't like the format, it needs to be in "YYYY-MM-DD" (Excel) format.

Do these two formats have names? (so I can Google a little more)
Short of creating a lookup table for each combination of %Y or %M to Y and M is there a conversion method? Maybe in openpyxl? I'd prefer not to use an additional library just for this!

TIA!
Sounds like you are looking for a mapping between printf-style and Excel formatting. Individual date formats don't have names. And, due to the way Excel implements number formats I can't think of an easy way of covering all the possibilities. NamedStyles generally refer to a collection of formatting options such as font, border and not just number format.
Convert the string "%Y-%M-%D" to "YYYY-MM-DD" for use in openpyxl NamedStyle number_format