Send feedback on this topic.
Teradata.Client.Provider
Explicit Type Conversion(TdPeriodTimestamp,TdTimestamp) Operator



Teradata.Client.Provider Namespace > TdTimestamp Structure > Explicit Type Conversion Operator : Explicit Type Conversion(TdPeriodTimestamp,TdTimestamp) Operator
The TdTimestamp that is to be converted.
Converts a TdTimestamp into a TdPeriodTimestamp.
Syntax
'Declaration
 
Overloads Public Operator Narrowing CType( _
   ByVal value As TdTimestamp _
) As TdPeriodTimestamp
'Usage
 
public TdPeriodTimestamp operator explicit( 
   TdTimestamp value
)
public:
TdPeriodTimestamp operator explicit( 
   TdTimestamp value
)

Parameters

value
The TdTimestamp that is to be converted.

Return Value

a TdPeriodTimestamp is returned that has a beginning bound of value and ending bound that is one time granule greater than value.
Exceptions
ExceptionDescription
The ending bound could not be created because the value is set to TdTimestamp.MaxValue
Remarks

A TdTimestamp can be cast to a TdPeriodTimestamp. The beginning bounds of the period will be value, and the ending bound will be the value plus one time granule.

The time granule is dependent upon the scale of the value. For example, if the scale of value is 0 the time granule is 1 second. If the scale is 6 the time granule is 1 microsecond.

The scale of the period will be the same as that of value.

The following are examples of the result of casting a TdTimestamp to a TdPeriodTimestamp:

TdTimestamp TdPeriodTimestamp 0001-01-01 00:00:00 (0001-01-01 00:00:00, 0001-01-01 00:00:01 2001-12-31 23:59:59.00001 (2001-12-31 23:59:59.00001, 2001-12-31 23:59:59.00002) 5021-12-31 23:59:59.9 (5021-12-31 23:59:59.9, 5022-01-01 00:00:00.0)

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

TdTimestamp Structure
TdTimestamp Members
Overload List