ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: counting numbers with commas

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Declan Smith
Re: counting numbers with commas
on Jan 28, 2016 at 10:48:18 pm

Try adding this as your last line. The first part adds the "$" and the rest sorts out the commas. If you want to change how many numbers are needed before a comma, change the the number "7" below to what you need, say 3, which is standard.

"$" + Math.round(t).toFixed(0).replace(/(\d)(?=(\d{7})+(?!\d))/g, "$1,");

Declan Smith
http://www.madpanic.tv
After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase

"it's either binary or it's not"


Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]