Hours Format

Hi All,

Here I have a form A. This is having three fields.startdate and Enddate and TotalWorkedhours.

Example:: startdate : 7/30/2012

EndDate : 7/31/2012

TotalWorkedhours (HH:MM): (23:52)

i have to show the total time variance between start date and enddate in TotalWorkedhours (HH:MM) field.

(Format should be in HH:MM format only)

Hi,

you should have a look at dateTimeUtil class, it has a fonction that returns difference between 2 datetime values:

dateTimeUtil::GetDifference(date1,Date2)

hope it helps

regards,

Thomas

Hi kola give me u r email id , i will send u xpo file in Ax2012. its not that easy to give you answer here. :slight_smile:

thanks

Ravi

static void Job5(Args _args)

{

int hh, totalTime,mm,ss;

int quotient;

int tt;

;

totalTime = 3599; //Total seconds

quotient = totalTime/60; // total minutes

print quotient;

hh = quotient/60; // total hours

print hh;

mm = quotient mod 60;

print mm;

ss = totalTime mod 60;

print ss;

tt = 66060;

print tt;

pause;

}

I was developed in class for your task, BY using this method if your enter utc startdate Time and utc enddate Time its returns u r required format, like 23:06:05. already i replied in job still if u wont get let me know your mail id , i send you class file in xpo file and documentation

Hi Ravindra,

Thank you very much for your quick reply.

axexpert@hotmail.com

This is my email id.