Execute the code in job
static void Job39(Args _args)
{
TimeOfDay time= timeNow();
int hour;
Minutes minutes;
minutes = time/60; //minutes
hour = minutes/60; //hours
info(strFmt("second:%1, Minutes :%2 hour:%3 ",time,minutes, hour));
}
You will get output like
O/P
second:64490, Minutes :1074 hour:17
Note::Output as per my current time.
Showing posts with label time. Show all posts
Showing posts with label time. Show all posts
24 Dec 2015
21 Aug 2014
Difference between two dates + AX 2012
You have a grid where you can select the StartDate and the EndDate of the vacation, and you have a field for the calculation of the differnce in days between these two fields:
You can override the method leave and use this code for example to calculate the diffrence:
public boolean leave()
{
Boolean ret;
StartDate inputDate;
EndDate refDate;
ret = super();
inputDate = str2Date(strFmt("%1",TestTable.StartDate), 123);
refDate = str2Date(strFmt("%1",TestTable.EndDate), 123);
TestTable.Hours=intvNo(refDate, inputDate, intvScale::YearMonthDay);
return ret;
}
You can override the method leave and use this code for example to calculate the diffrence:
public boolean leave()
{
Boolean ret;
StartDate inputDate;
EndDate refDate;
ret = super();
inputDate = str2Date(strFmt("%1",TestTable.StartDate), 123);
refDate = str2Date(strFmt("%1",TestTable.EndDate), 123);
TestTable.Hours=intvNo(refDate, inputDate, intvScale::YearMonthDay);
return ret;
}
29 Nov 2013
Get AOS timezone + AX 2012
static void LegenderTimejone(Args _args)
{
print xGlobal::machineTzDisplayName();
pause;
}
{
print xGlobal::machineTzDisplayName();
pause;
}
Subscribe to:
Posts (Atom)
Create number sequence in D365 FO
Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...
-
Dialogbutton dialogButtonConfirm; ; dialogButtonConfirm = Box::yesNo("continue ", dialogButton::Yes, ...
-
how you can disable a form element, based on the value of another form element. As example, the CustTable form will be used. The examp...
-
AXAPTA History Axapta 1.0 Development of Axapta began in 1983 at Danish company Damgaard Data A/S. The first version of Axapta (pr...
