Показать сообщение отдельно
Старый 08.11.2017, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,448 / 846 (79) +++++++
Регистрация: 28.10.2006
palleagermark: Query range function: Less than date and not date null
Источник: http://www.agermark.com/2017/11/quer...-date-and.html
==============

There is a lessThanDate query function in AX, but it also selects blank dates.

Here is a suggestion for a similar function, that does not include the blank dates:
public static str lessThanDateAndNotNull(int relativeDays = 0)
{
utcdatetime currentDateTime;

currentDateTime = DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::getSystemDateTime(),
DateTimeUtil::getUserPreferredTimeZone());

return SysQuery::value(dateNull() + 1) + ' .. ' +
SysQuery::value(DateTimeUtil::date(DateTimeUtil::addDays(currentDateTime, relativeDays - 1)));
}


Источник: http://www.agermark.com/2017/11/quer...-date-and.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.