Use Int16 (short) as Date in C#

It have range only 10/1/1 to 32/12/31 but occupate just 2 bytes, whereas Date 3 bytes in SQL Server. Types like SmallDateTime or DateTime2 I won’t comparing because stored also time.

Unit tests:

Constansts:

 

Leave a Reply