Framework EDI Reference. Methods and Properties
ediDataElement. DataType

Returns the data type of a data element.

Syntax:

Remarks

The data element is always associated with a data type that indicates the nature of the data it is allowed to hold.  The following are possible values for data types:

ASC/X12

N<n> - Numeric value with implicit decimal point.
N0 - Integer.
R - Decimal.
ID - Identifier.
AN - Alphanumeric.
DT - Date.
TM - Time.
B - Binary.

UN/EDIFACT

A - Alphabetic.
N - Numeric.
AN - Alphanumeric.

Example

Dim oDataElement As Fredi.ediDataElement
Dim oDataSegment As Fredi.ediDataSegment

:

' Get first data segment in document.
Set oDataSegment = oEdiDoc.FirstDataSegment

' Get the data element that is the 5th position of the BEG data segment.
Set oDataElement = oDataSegment.GetDataElementByPos("\ISA\GS\ST\BEG<373>")

' Show the data type of the data element.
MsgBox "Data type is " & oDataElement.DataType

Sample

P_DataType.zip