2 decimals of precision

Hi, forgive me if this is a simple question. I’ve been looking at the manual for the past 30 minutes and I can’t find what I need.

I am reading in two numbers to two different vars and adding them together and pasting the result. Well, I’m doing a bit more than that, but that is the basic idea.

The problem: The numbers are dollar amounts, so I want them to always have 2 decimals of precision visible. But keyboard maestro always shorts them. i.e. 5.00 gets stored in the var as 5, or 4.20 gets stored in the var as 4.2. So then when I paste the var, it doesn’t look as I want it. How can I tell keyboard maestro to always store the 2 decimals even if they are 0?

Thanks!

never mind. 20 more minutes of fiddling around and I figured it out. Under the tokens menu. You can delete this question.

Fiddling around is also my preferred method when I want to understand how something works.

But if you are looking for a quick information you could search the forum or the KM Wiki:

A forum search for “decimal” (one of the words in your topic title) gives you a very good hit on position #2.

A KM Wiki search gives you a hit on position #1 that contains a link to the above mentioned forum thread. Search result #4 gives you the complete explanation of the Format token.

Or open the “Help” in the Gear :gear: menu of the Calculation action, which leads to the same Wiki article as #1 in the search. See this very nice Wiki article for how to get immediate help from within the KM Editor.

As @Tom suggested in his first link, most of the time the easiest method is to use the "Format" option/parameter on the Set Variable to Calculation action (KM Wiki).