![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFxKd0GflVCExlXhGuBe359RWzxpSWiWigWz6qVBy7hE-bLvIfKrZSIJ8WYHjAREOP0lMw5jWlcMiBpBlxYMwQPQHv2tBqyZYvc6FrND0Kb1XDULF17uJXQ6D9ivHbPFVrJAR52YMUnvIv/s200/MS-AX-Logo.jpg)
today() - mkdate(31,01,2011) ;
or
days = date2num(Date123) - date2num(Date234);
or
TblName.FieldName= date2num(today()) - date2num(AnotherTblName.DatefeildName);
To get the difference between two DateTime Values just use the DateTimeUtil Class. The result is the difference in seconds. So just divide these through #secondsPerDay and you'll get the days
#timeConstants
days = DateTimeutil::getDifference(DateTime123, DateTime234) / #secondsPerDay;
-------------------------------------------------------------------
date2num(systemdateget()) - date2num(urtable.date);
---------------------------------------------------------------------------------------------------------
static void DateDiff(Args _args)
{
TransDate d1,d2;
int daysdiff;
;
d1 = 31\12\2010;
d2 = today();
daysDiff = d2 - d1;
info(strfmt("%1",daysDiff));
}
{
TransDate d1,d2;
int daysdiff;
;
d1 = 31\12\2010;
d2 = today();
daysDiff = d2 - d1;
info(strfmt("%1",daysDiff));
}
-----------------------------------------------------------------------------------------------------
Or just override the field in datasource level as modified()
then
tablename.fieldName3 = tablename.fieldName2 - tablename.fieldName1;
filedName1 - Out put field,
filedName2 - To date field,
filedName2 - from date field,
Or just override the field in datasource level as modified()
then
tablename.fieldName3 = tablename.fieldName2 - tablename.fieldName1;
filedName1 - Out put field,
filedName2 - To date field,
filedName2 - from date field,
No comments:
Post a Comment