It sounds tricky, not because it's hard, but because of all the exceptions to date format.
If we simplify it to be fake dates by assuming all months have 30 days, and the input is MM/DD (i.e. 04/30), then it's trivial, multiplying MM*30 + DD.
That said, the solution for the real dates, would just be a bunch of maps ... month numbers mapped to how many days they have, { 1: 31, 2: 28 }, etc. Same for leap years, another map. And then it's the same formula as above but looking up the values first.
In other words, this may be hard for the wrong reasons I feel. Junior candidates would take longer, but it's bcause of the exceptions of date format. Perhaps you can think of a similar problem that uses something other than dates, and that has more regularity in its type.