Share via


Primitive Data Types

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

The primitive data types in X++ are listed in the following table. For more information about each data type, click its link.

Anytype

A placeholder for any data type.

Booleans

Can only contain the values false and true.

Dates

Contains day, month, and year.

Enums

An abbreviation for enumerated text—a set of literals.

GUIDs

A globally unique identifier.

Integers

A number without a decimal point. To declare an integer, use the keyword int.

Reals

Numbers with a decimal point; also called decimals.

Strings

A number of characters. To declare a string, use the keyword str.

TimeOfDay

Contains hours, minutes, and seconds. To declare a time, use the system type timeOfDay.

utcdatetime

Contains year, month, day, hour, minute and second.

Note

Most of the primitive data types can be automatically converted.

See also

Composite Data Types

Conversion of Data Types

Extended Data Types (EDTs)

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.