http://msdn.microsoft.com/en-us/library/aa865135.aspx I believe: anInt = date1 - date2; and anInt will = the # of days different.
--- On Wed, 12/3/08, larrybellou <[EMAIL PROTECTED]> wrote: From: larrybellou <[EMAIL PROTECTED]> Subject: [development-axapta] datediff equivalent in X++ To: [email protected] Date: Wednesday, December 3, 2008, 7:07 AM How can I figure out the difference in # of days between two dates? Can it be done using a select statement as well? The following t-sql is what I am trying to accomplish but if you can answer one or both of the above questions would help me get there as well.. T-SQL select avg(datediff( day, transdate, closed)) from custtrans ct (nolock) where accountnum=' aa122'and closed > '1/1/1900' and dataareaid=' demo' and amountmst>0 and transdate >= getdate()-90 select custTrans where localCustTrans. AccountNum= ='ba368' && localCustTrans. Closed != datenull() && localCustTrans. AmountMST > 0 && localCustTrans. TransDate >= systemdateget( )-90; [Non-text portions of this message have been removed]

