#Azure Storage Tables – DateTime.MinValue is not Within the Supported DateTime Range
Azure Table Storage is a NoSQL storage key/value based part of Microsoft Azure Storage services. It’s really good at absorbing massive amounts of data. It’s really good at massive parallel operations work on small amounts of data. But it’s horrible when it comes time to extract large amounts of data in a serial manner. We’ll get to that topic in a future post.
DateTime is a type that is used to represent time in .NET. We use it very liberally without much afterthought. But when we start playing with Azure Table Storage, we have to think about the supported DateTime range. At this time, it’s also important to note that the local Azure Storage Emulators run on various database flavors like SQL Server and LocalDB. These databases do not impose the same limitations for DateTime values. Therefore, this bug will only show up on Microsoft Azure.
In order to limit headaches, I’m providing the following table to help identify what is supported and what isn’t.
|Common Language Runtime type||Details|
|byte||An array of bytes up to 64 KB in size.|
|bool||A Boolean value.|
|DateTime||A 64-bit value expressed as Coordinated Universal Time (UTC). The supported DateTime range begins from 12:00 midnight, January 1, 1601 A.D. (C.E.), UTC. The range ends at December 31, 9999.|
|double||A 64-bit floating point value.|
|Guid||A 128-bit globally unique identifier.|
|Int32 or int||A 32-bit integer.|
|Int64 or long||A 64-bit integer.|
|String||A UTF-16-encoded value. String values may be up to 64 KB in size.|