Parameters
- value
- The integer representation of the date.
| Exception | Description |
|---|---|
| System.ArgumentOutOfRangeException | The value cannot be represented as a TdDate. |
It is not recommended that this constructor be used to create a TdDate.
The integer that can be converted to a date is the same as described in the Teradata SQL Reference: Data Types and Literals.
The date components contained in an integer will be determined by the same formula as used by the Advanced SQL Engine:
(year – 1900) * 10000 + (month * 100) + day
Therefore, the date components that are in the 1900’s will appear in the integer as
YYMMDD
Here are some examples of conversions from Int32 to TdDate:
| Integer Representation | TdDate Representation |
|---|---|
| 990415 | 1999-04-15 |
| 071121 | 1907-11-21 |
| 2001225 | 2100-12-25 |
| 20070531 | 3907-05-31 |
| -989495 | 1801-05-05 |
| Product | Versions | Platforms |
|---|---|---|
| .NET | 6, 7 | Windows, Linux, MacOS |
| .NET Framework | 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 | Windows |
| .NET Standard | 2.0 | Windows, Linux, MacOS |