Page 1 of 1

Add dots to number

Posted: 05 Oct 2018, 03:07
by blue83
Hi,

Does anyone knows how to convert this number 123456789 into this 123.456.789

Thanks

Re: Add dots to number

Posted: 05 Oct 2018, 03:49
by blue83
Thank you all, but I found a way

https://autohotkey.com/board/topic/9009 ... er-format/

Code: Select all

num := 100000
msgbox % KSep(num)

KSep(x, d=2, s=".") {
	return RegExReplace(round(x,0), "\G\d+?(?=(\d{3})+(?:\D|$))", "$0" s)
}