Dates - Nulls, Minimum, Maximum

Dates - Nulls, Minimum, Maximum

Hi everyone,

I am trying to understand why Dates in the OutSystems Platform range from 1900-01-01 00:00:00 to 3000-12-31 23:59:59.
We can save different values into the database using OutSystems - for SQL Server we can save between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. So why having this 1900 to 3000 limit?

There is no null date in outsystems... This makes me think you use DateTime Structure in C# to handle dates, because it is a value type, meaning it doesn't have a null...but at the same time the platform default value is 1900-01-01 00:00:00 which sounds like a conversion to DateTime of SqlDateTime when it's null.

"The SqlDateTime structure has a different underlying data structure from its corresponding .NET Framework type, DateTime, which can represent any time between 12:00:00 AM 1/1/0001 and 11:59:59 PM 12/31/9999. SqlDateTime actually stores the relative difference to 00:00:00 AM 1/1/1900. Therefore, a conversion from "00:00:00 AM 1/1/1900" to an integer will return 0."

If I make a simple test on a C# console application with Visual Studio, I get this:

So, for OutSystems the default value for a "Date Time" is given by: (DateTime)SqlDateTime.Null ?
DateTime structure doesn't have null, so...

At the same time, we can save to the database values since 01/01/1753, so why not supporting this in the platform? Is there any technical detailed note on this? I'm really confused... Time to go to sleep ;)
legacy is my bet.

The same legacy that keeps the "Date Time" data type on Outsystems mapped to "datetime" on SQL Server instead of moving to "datetime2".
Not knowing what's going on under the hood, I wonder how the platform leverages the use of nullable types?

For instance, a nullable DateTime can be null. The DateTime struct itself does not provide a null option, since it is a value type, but the "DateTime?" or "Nullable<DateTime>" allows you to assign the null literal to the DateTime type.