Friday, November 3

AX 2012 - Convert Transdate (mm/dd/yyyy) format to cheque date format in ax 2012

Format the date to fit it in the boxes printed on the check paper like:



         // Date Formating Begins
        //format the date to fit it in the boxes printed on the check paper
        chequeTmp.SL_DateStr   = strFmt('%1', date2str(TransDate, 123, DateDay::Digits2, DateSeparator::None, DateMonth::Digits2, DateSeparator::None, DateYear::Digits4));

        j = strLen(chequeTmp.SL_DateStr);

        for(i = 1; i <= j; i++)
        {
            tempString = tempString + subStr(chequeTmp.SL_DateStr, i, 1);

            if(i != strLen(chequeTmp.SL_DateStr))
            {
                tempString = tempString + "    ";
            }
        }

        chequeTmp.SL_DateStr = tempString;

No comments:

Post a Comment

Popular Posts