TimeOfDay [AX 2012]

Updated: October 2, 2009

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

The timeOfDay or time data type is an integer value representing the number of seconds that have elapsed since midnight.

The range of a timeOfDay data type is in the closed interval [0; 86400]. Values above 86400 (23:59:59) cannot be interpreted.

TimeOfDay declaration

=

timeOfDay Variable { , Variable } ;

variable

=

identifier [ option ]

option

=

Arrayoptions | initialization

//Declaration of a time variable, time1
timeOfDay time1;
 
//Declaration and initialization of a time variable to 00:21:35
timeOfDay time2 = 1295;

timeOfDay variables can be used as literals in the same way as integers are used as literals.

The same automatic conversions that are available for integers are also available for timeOfDay variables (Booleans, enums, and reals).

Any operations that can be performed with integers can also be performed with timeOfDay variables.

Keyword

timeOfDay

Size

32 bits

Scope of data type

[0; 86400]

Default value

0

Implicit conversions

Automatically converted to real, boolean, and enum

Explicit conversions

str2time, time2str


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

Community Additions

ADD
Show: