The date today is 7th June 2019, or 07/06/2019 (using the English DD/MM/YYYY ordering).

When is the next date that when written in this way has all eight digits different?


Rather remarkably, I wrote down this exact puzzle in my notebook a couple of years ago to which I think the answer is

17/06/2345 in DD/MM/YYYY format.


Notice that the first M will either be $0$ or $1$.
If it is $0$ then the first D will either be $1$ or $2$ or DD will be $31$.
If it is $1$ then either the second M will be $0$ or the second M will be $2$ and the day will contain a $0$.

Overall, this means that $0$ and either $1$ or $2$ must be used in the DD/MM part. If we don't want to skip to the next millenium, we need the $2$ for the beginning of the year.
Hence the DD/MM part requires both $0$ and $1$.
After that, we focus on the nearest year possible which comes from assigning the digits $3,4,5$ in order to century, decade and digit of the year.
It makes more sense to assign the $0$ to the month instead of $1$ but we cannot assign both since we cannot have a day without any of $0$, $1$ or $2$. Hence, we assign $6$ to the month and then $7$ to create the day.

  • 9
    $\begingroup$ I can confirm that this is also the result of writing a dumb Python program to try future dates until it finds one satisfying the given condition. $\endgroup$ – Gareth McCaughan Jun 7 '19 at 15:04
  • 1
    $\begingroup$ Pleasingly (but also somewhat obviously) the two days following also satisfy the condition. $\endgroup$ – IanF1 Jun 16 '19 at 21:06

I cannot comment yet and I know this is not what the asker meant but it is natural to ponder what is the closest date (in future or past) with that property. With a similar deduction as in the answer marked correct I came up with the date


and in similar fashion to the next future date also the two previous days satisfy the condition.

  • $\begingroup$ Nice observation, and welcome! $\endgroup$ – mbingo Feb 20 '20 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.