FreeMarker - Remove comma from milliseconds

Adding to Gil's answer, if you build the configuration inside your code, you can set the flag globally by :

Configuration cfg = new Configuration();
...
cfg.setNumberFormat("computer");

It looks like as of version 2.3.17 you can use:

${myDate?long?c}

http://sourceforge.net/p/freemarker/feature-requests/72/


As an alternative you could write on your Freemarker template this directive:

<#setting number_format="computer">

This will remove all commas from numbers.

This works fine for Freemarker 2.3.23

More info about these directives can be found here:

http://freemarker.org/docs/ref_directive_setting.html