The following code returns an integer, I need to to be three digits wide when I write it to a text file, padded with leading zero;
WORKDATE-CALCDATE('<-CY>',WORKDATE)
So the above might return
1 to be 001
34 to be 034
345 to be 345
I can't seem to get the format command to do this so had a look at PADSTR but that pads as the end.
Any ideas?
Professional Navision Developer
0
Comments
So '0' + MyDateAsaString
FORMAT has a <Day,2> property you can look into as well.
My Blog - nav.education
I find having a left pad function is necessary with a lot of EDI transactions that have very exact data requirements in the character formats submitted.
Epimatic Corp.
http://www.epimatic.com