Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

What type of variable holds calculation of lead time ?

(1) ShareShare
ReportReport
Posted on by 144
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
    8,572 Super User 2025 Season 1 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);
     
    Regards,
    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
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 601 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 416

#3
Adis Profile Picture

Adis 384 Super User 2025 Season 1

Product updates

Dynamics 365 release plans