Send feedback on this topic.
Teradata.Client.Provider
TdDate Constructor(Int32)



Teradata.Client.Provider Namespace > TdDate Structure > TdDate Constructor : TdDate Constructor(Int32)
The integer representation of the date.
A Date represented as an integer is converted into a TdDate.
Syntax
'Declaration
 
Public Function New( _
   ByVal value As Integer _
)
'Usage
 
Dim value As Integer
 
Dim instance As New TdDate(value)
public TdDate( 
   int value
)
public:
TdDate( 
   int value
)

Parameters

value
The integer representation of the date.
Exceptions
ExceptionDescription
The value cannot be represented as a TdDate.
Remarks

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
Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdDate Structure
TdDate Members
Overload List