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