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 Teradata database:

(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

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdDate Structure
TdDate Members
Overload List