≡ Menu

How to get time difference between two different time values (TimeEdit control) in MS Dynamics Ax 2012

Today I got change to work with timeedit control in Ax where we have to get input of time and then take difference to get number of hours.

For this example I used timeEdit control and add two timeEdit control in form.These timeEdit controls are unbound, I set the out of the box FromTime and ToTime extended data Type and set auto declaration property to true so these controls can be access by name in code.


Similarly set the properties ToTime.


Now add button and add its click method. The time difference between two times value can be get with timeConsumed out of the box function.


void clicked()







5-15-2015 12-19-11 AM

output is as

5-15-2015 12-19-25 AM





out put is as


5-15-2015 12-19-51 AM

{ 0 comments… add one }

Leave a Comment