I am trying to read dates in the following format using a single format string:
"1000.12.31"
"999.12.31"
"99.12.31"
They corresponded to dates in 1000 A.D., 999 A.D. and 99 A.D.
I tried the following format lines:
yyyy.M.d. This fails for 999 and 99 years.
yy.M.d. This fails for 1000 and 999. It also interprets 99 as 1999.
I'm going to resort to parsing it manually (simple enough for this), but I'm wondering if something like this is DateTime.ParseExactpossible with, or possibly with, another built-in method?
source
share