Not a developer? Go to



A general purpose formatter based on the sprintf command found in a number of programming languages. The value of the attribute should be the format string. The tag value will be passed in as the argument to sprintf.


Format the entry count with parentheses and pad with zeros to 6 digits:

<$mt:EntryCommentCount sprintf="(%.6d)"$>

Result for an entry with 23 comments:


Format the month number with a proceeding 0 if number is a single digit:

<$mt:Var name="month_number" value="2"$>
<$mt:Var name="month_number" sprintf="%02d"$>

Output for month “2” (February):


Convert the value of TagName into a floating point number with a precision of 2:

<$mt:TagName sprintf="%.2f"$>

Leave a Comment