Hi, I'm extremely new to Stata (5 weeks) and am stuck with something my lecturer has asked us to do. I have to use a string variable recording a date to create a date formatted variable which I did as such:
generate Date_Variable = date(originaldatevariable, "MDY")
However I noticed that for all the dates before 1900 the date is recorded in the format Y-M-D as opposed to the rest which are M/D/Y. So all these observations come up as missing values in the new date variable. I have zero idea how to deal with this problem with the very limited knowledge I have as we hadn't even learned about dates before starting this assignment any help would be much appreciated.

I'm using Stata 16, and for the life of me can't find any ways to do this online that I understand.