Add leading zeros
You want to show a integer with a fixed length (for example 2characters: 1 –> 01). You don’t have to write your own for-loop to ad the zero’s in front or something like that. The function strRFix does this for you automaticly.
1 | info(strRFix(int2str(1), 2, '0')); |
Note: there is also a strLFix…
Tags: Dynamics AX, Programming, str, Tips & Tricks, X++
This entry was posted on Friday, July 31st, 2009 at 17:45 and is filed under Dynamics AX. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


August 3rd, 2009 at 10:48
Art Of Creation – Dynamics AX Blog » Remove leading zeros says:[...] you’ll want to add leading zeros to a string, but other times, you’ll have to remove leading zeros from a string. Here the code that does [...]