Find effective date between two dates in AX 2009

Hi Everyone,

I need to find effective dates between two dates in AX 2009.


User will give system date. Let’s say (01-07-2016).

It should select the second record, since the from date and to date lies between 01-07-2016.


I know in AX 2012, Date effective framework can be used.

But in AX 2009, some logic should be used.

Any help will be helpful! Thanks in Advance.

is it TOdate 27-07-2015 ??? or 27-07-2016

Hi [mention:689864b058134d749b3240811cf20f43:e9ed411860ed4f2ba0265705b8793d05] . Sorry it should be 27-07-2016.

select myTestTable where myTestTable.FromDate <= systemdateget() && myTestTable.ToDate >= systemdateget();

It’s simple . And been solved.