Around XIVth century if i not mistaken.
(edited) adding later examples
More examples of metal underwear:
Last one, again, with chainmail shorts and unprotected legs. I can clearly see that guy priorities
I hope that theirs is chainmail
Here (bottom left) yet another bearer of iron underwear without leg protection...