Date format with Space

Hi All,

how to get the Date with spaces for ex : 2 2 1 0 2 0 1 4 (22/10/2014), when we click the Print Check in Bank Payment Voucher date should be with 8 digits with separate Boxes we need to Display in MS NAV 2013 R2

Kindly help me

FORMAT(YourDate, 0, '<Day,2> <Month,2> ');

  • more complete:
    ::
    tx := FORMAT(da, 0, ‘<Day, 2><Month, 2>’);

i := 1;

WHILE i < STRLEN(tx) DO BEGIN
tx := COPYSTR(tx, 1, i) + ’ ’ + COPYSTR(tx, i + 1);
i += 2;
END;
::

Dear Anfinnur,

Many Thanks for the code sir i need 1 help from you regarding above code,from the above code my date is showing like this

0 5 0 5 2 0 1 5 but i want more space in each number like 0 5 0 5 2 0 1 5 can you please help me out regarding this issue.

Best Regards

Abuzar Shaikh

With two spaces between digits -

::
tx := FORMAT(da, 0, ‘<Day, 2><Month, 2>’);

i := 1;

WHILE i < STRLEN(tx) DO BEGIN
tx := COPYSTR(tx, 1, i) + ’ ’ + COPYSTR(tx, i + 1); //one more space added
i += 3;
END;
::

Thank you very much sir it worked [:)] [:)] [Y] [Y]