cancel
Showing results for 
Search instead for 
Did you mean: 

Internal error (3006) occurred [Message 131-183]

mari_outtaleb22
Participant
0 Kudos

Hi,

I tried to have a deffrence between 2 dates in SAP B1 Using UDF, but it dosn't work;

this is the query i used ;

declare @D1 datetime

declare @D2 datetime

set @D1 =(select CONVERT(date,$[$12.0.0],104))

set @D2 = (select CONVERT(date,$[$10.0.0],104))

SELECT distinct datediff(month,@d1,@d2) as 'Date Diffrence'

Any idea plz ?

Accepted Solutions (1)

Accepted Solutions (1)

SonTran
Active Contributor
0 Kudos

Hi,

Try this

declare @D1 datetime

declare @D2 datetime

set @D1 =(select $[$12.0.date])

set @D2 = (select $[$10.0.date])

SELECT datediff(month,@d1,@d2)

Hope this helps,

Son Tran

mari_outtaleb22
Participant
0 Kudos

Thank you,

I tried this solution, it's working for me.

Have good day .

Answers (0)