The format of the variable, here %dN/D/Y, is essentially a
cosmetic matter. What you should be worried about is whether
some of the values are about a century out, because
of some previous error on reading the data into Stata.
Suppose the variable concerned is called -date-.
count if year(date) < 1910
will reveal how many are a century out. If there are some they need
fixing by
replace date = mdy(month(date), day(date), year(date) + 100) if
year(date) < 1910
and you need to revise analyses done with these data.
I have a variable of type %dN/D/Y. Some of the dates are in years
2000-2005. When I sort by this variable, Stata seems to recognize some
of the 2000-2005 dates as 1900-1905, hence putting them as the earliest
date rather than the most recent. Any ideas as to how to get Stata to
recognize 01/01/05 as a 2005 date rather than 1905?