Monsieur Winner

MS D365FO || Monsieur D365FO

Technical

How to convert from date to string using x++

The code below is written in D365FO.

    public Description dateInWord(TransDate _date)
    {
        Description day, month, year;

        day = int2Str(dayOfMth(_date));
        month = mthName(mthOfYr(_date));
        Year  = int2Str(Year(_date));

        return strFmt("%1th %2, %3",day,month,Year);


    }

08/06/2024 ( MM/DD/YY) will is outputted as 6th August, 2024

Komi Siabi

Komi Siabi is a Bilingual D365FO Solution architect who loves sharing his knowledge as he works on Both Francophone and Anglophone projects around the globe. He enjoys doing some tiktok videos in his leisure time.

Leave a Reply

Your email address will not be published. Required fields are marked *