Skip to main content
Dynamics 365 Community / Forums / Finance forum / What type of variable ...
Finance forum

What type of variable holds calculation of lead time ?

editSubscribe (1) ShareShare
Posted on by 898
Hi guys,
If we calculate time different between two date time (utcdatetime), what would be the result ?
I'm asking because I'm using LeadTime EDT to save the calculation for example : DateTimeEnd - DateTimeStart, but I get error conversion. /Cannot implicitly convert from type 'utcdatetime' to type 'int(LeadTime)'/
My calculation is simply like this:
public class TestWorkTable extends common{    /// <summary>    ///    /// </summary>    display LeadTime processTime()    {        return this.DateTimeExecuted - this.DateTimeAnswered;    }}
This is only for a display method which later I'm going to use it in my form.
  • Verified answer
    Waed Ayyad Profile Picture
    Waed Ayyad 1,911 on at
    What type of variable holds calculation of lead time ?
    Hi @Tony,
    Do you want to get time difference? or you want to get the difference between the 2 datetime values?
    LeadTime is Int EDT. Try to use  DateTimeUtil.getDifference( this.DateTimeAnswered,this.DateTimeExecuted);
    Waed Ayyad
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans