Can retrieve the record by using createdDate field from salesTable

I am wondering if someone could help me please . I am trying to run a query
while select salesline where salesline.createdDate==systemDateget()

but when i execute either by job or on table my system goes crash . i have took to following step.
I can fetch the data by any other field like i can do
while select salesline where salesline.itemId==“A-Bh009”
it works fine . i have tried to run the same query on data base server it works fine .
i can retrieve the record from any other table like purchTable on the base of createdDate field.
So the only issue is with the salesline table where i cant fetch the record by date field . I am so confuse coz this is happening on test system as well .I would appreciate immediate help .

You can filter data from table using any datatype you are using…Please check the condition which you have given… Put the debugger and check whether you condition is getting data or not?

You tagged your question by “AX2009”, but AX2009 doesn’t use CreatedDate field anymore - you should use CreatedDateTime instead.

See also Vanya’s tutorial about UtcDateTime.


I accept with Mr. Martin’s suggestion. You have to specify the date in UTCdateTime Format…