web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Behind AX / Axapta - Don't Miss One...

Axapta - Don't Miss One Second When filtering Between Two DateTime Fields

metin emre Profile Picture metin emre 502
If we take time 00:00 of day after last day and use < instead of <= we don't miss even one second:

fromDate = DateTimeUtil::newDateTime(FromDateEdit.dateValue(),0,DateTimeUtil::getCompanyTimeZone());
    toDate   = DateTimeUtil::newDateTime(ToDateEdit.dateValue()+1,0,DateTimeUtil::getCompanyTimeZone());

    while select count(RecId) from serviceOrderTable
                where serviceOrderTable.createdDateTime >= fromDate
                    && serviceOrderTable.createdDateTime < toDate


This was originally posted here.

Comments

*This post is locked for comments