How to get the date Format directives of a date string

Viewed 24

I have a string in date format. It would be "2020-09-30", "09-30-2020", etc. I would like to get back the Format directives of the date string.

For example, if the string is "2020-09-30", I would like to get back "%Y-%m-%d".

1 Answers
Related