Hi,
Working with utcDateTime Fields in Select Statements in Dynamics AX 2012
Below code returns last five days sales quotations
static void ShyamDateTimeTest(Args _args)
{
SalesQuotationTable salesQuotationTable;
utcDateTime createDateTime;
createDateTime=DateTimeUtil::getSystemDateTime();
createDateTime=DateTimeUtil::addDays(createDateTime,-5);
while select salesQuotationTable where salesQuotationTable.createdDateTime>=createDateTime
{
info(salesQuotationTable.QuotationId );
}
}
References
https://stoneridgesoftware.com/working-with-utcdatetime-fields-in-select-statements-in-dynamics-ax-2012/
https://dynamicsuser.net/ax/f/developers/43168/createddatetime-convert-to-date-and-use-in-while-select
https://msdn.microsoft.com/en-us/library/cc569557.aspx
Working with utcDateTime Fields in Select Statements in Dynamics AX 2012
Below code returns last five days sales quotations
static void ShyamDateTimeTest(Args _args)
{
SalesQuotationTable salesQuotationTable;
utcDateTime createDateTime;
createDateTime=DateTimeUtil::getSystemDateTime();
createDateTime=DateTimeUtil::addDays(createDateTime,-5);
while select salesQuotationTable where salesQuotationTable.createdDateTime>=createDateTime
{
info(salesQuotationTable.QuotationId );
}
}
References
https://stoneridgesoftware.com/working-with-utcdatetime-fields-in-select-statements-in-dynamics-ax-2012/
https://dynamicsuser.net/ax/f/developers/43168/createddatetime-convert-to-date-and-use-in-while-select
https://msdn.microsoft.com/en-us/library/cc569557.aspx
Comments
Post a Comment