kleland Posted September 1, 2009 Share Posted September 1, 2009 Hi, I'm trying to format a 10-digit number with internal spaces. In other words, my number 0000000000 should be output as 000 0000 000. I tried the FormatNumber rule but it does not take spaces as characters(?). Any ideas on how to do this would be appreciated. Link to comment Share on other sites More sharing options...
tobarstep Posted September 1, 2009 Share Posted September 1, 2009 Assuming your input is always going to be 10 digits you could try something like: var example = "1234567890"; return example.substr(0,3) + " " + example.substr(3,4) + " " + example.substr(7,3); Just replace the example variable with your input field. Link to comment Share on other sites More sharing options...
kleland Posted September 1, 2009 Author Share Posted September 1, 2009 Thanks, that worked! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.