Date Format

Hi All,

(Question going to ask is already asked in this group, but still dint get satisfactory answer)

How can I get date in this formate: Day,Month,Year //…means I need comma as a saperator…//

another Question:

I want to print date in boxes(for each digit) means " 0 1 0 4 1 2 " Here each digit should come in Box //…(this is represnting 1 april 2012…//



Regarding the date format, the easiest solution probably is:

System.String::Format("{0:dd,MM,yyyy}", today());

For complete list of formatting options see MSDN: Custom Date and Time Format Strings.

But to do it in X++ is also a piece of cake:

strFmt("%1,%2,%3", dayofmth(d), mthofyr(d), year(d))

If you need leading zeros, just use AX functions for number format, e.g.

num2Str0(dayofmth(d), 2)