Hi, In this post I am going to show the difference between 2 utc datetime and it will return the Days,Hours,Minute,Second in Microsoft Dynamics AX 2012. utcDatetime PreparedOn ; utcDatetime DispensedOn ; str diffTime ; int time; if(DispensedOn !=utcdatetimenull() && PreparedOn!=utcdatetimenull()) { time = DateTimeUtil :: getDifference(DispensedOn,PreparedOn); diffTime = strFmt('%1d:%2h:%3m:%4S',(time div 86400),((time Mod 86400) div 3600),((time Mod 3600) div 60),((time Mod 3600) Mod 60)); }