Question Status

Suggested Answer
Eitan Mizrahi asked a question on 12 Jun 2012 2:48 AM

Hello,

How can I do :

while select dateColumn1, dateColumn2 ....

from myTable

where myTable.dateColumn1 >= myTable.dateColumn2 + 1 // **** I want to compare to date of column + 1 day. How can I do that?

{

// **** ....

}

 

Thanks :)

 

Reply
Suggested Answer
Amir Nazim responded on 12 Jun 2012 7:40 AM

conversion method used in select is not supported in AX.

you may get some idea with the blog on how you can achieve your requirement

msdax.wordpress.com/.../how-to-find-those-record-that-are-modified-on-certain-date-from-a-certain-table

Reply
ArturC responded on 12 Jun 2012 3:57 AM

Hello Eitan,

You can use DateTimeUtil class method addDays.

Dont forget time stamps in datetime type fields. But still you can use the same DateTimeUtil class to manage with all hhmmss issues.

Reply
Eitan Mizrahi responded on 12 Jun 2012 7:23 AM

In select (AX 2009)?

I think I cannot use DateTimeUtils in select statment (or any function).

Anywise - for my question: How can I select the date without the time (time = 0, and date = same date as query).

Thanks :)

Reply
Suggested Answer
Amir Nazim responded on 12 Jun 2012 7:40 AM

conversion method used in select is not supported in AX.

you may get some idea with the blog on how you can achieve your requirement

msdax.wordpress.com/.../how-to-find-those-record-that-are-modified-on-certain-date-from-a-certain-table

Reply