DateTime limit to the future

Hi all,

Documentation says that the oldest date allowed for DateTime is 01-01-0001 00:00:00.
It seems like there is a limit to the futur.
Actually, if you try 01/01/144684 as a string for DateTime:

MyDate=DateTime.FromString(“01/01/144684”, Locale.Current) ’ Locale is a French one

You get a RuntimeException “Date is not in an accepted format for parsing”.
“31/12/144683” is accepted.

Could someone confirm and explain why? I’m so curious to know what DayOfWeek will my 142 686th birthday happen … :grin:

TIA

Jean-Luc

1 Like

It looks like a limit with .FromString but you can use

MyDate= new DateTime(144684,1,1)

without problems.

1 Like

Thanks AlbertoD,

I didn’t notice that, so I think I will replace all my .FromString Constructors with Integers ones.