milnet92 / MXTXppInterpreter

Write, execute and debug X++ code directly in your browser.
MIT License
77 stars 16 forks source link

UtcDateTime assignment error #34

Closed dalabin closed 2 months ago

dalabin commented 2 months ago

I've got the following error during assignment UTCDateTime edt. image

milnet92 commented 2 months ago

Thank you @dalabin for opening the issue. My guess is that the types compared here are System.DateTime and Dynamics.Ax.Xpp.AxShared.utcdatetime. The correct one should be the later since utcdatetime is the struct wraper that X++ uses.

My guess is the type that is being assigned to "utcdatetime" keyword is incorrect (System.DateTime) and the one that is infered from DateTimeUtil::newDateTime() function is utcdatetime, which is correct.

milnet92 commented 2 months ago

Should be fixed with 6f5bb44. Also, implicit conversion for date and datetime were added.

Could you please try?

dalabin commented 2 months ago

@milnet92 , Thanks a bunch, it works perfectly!