Bonus tip: How to present code properly in a forum post
If you want to showcase either markdown, or code blocks, or dataview queries properly in a forum post, be sure to add one line before and one life after what you want to present with four backticks, ````. This will ensure that any other backticks (like for code blocks) is properly shown.
There is a difference between `= … `, and `$= … `. The first variant is an inline variant for a single value in the DQL query format/field, allowing you to do `= this.birth.date`. And the other is the inline variant of dataviewjs, allowing you to do stuff like `$= dv.span(dv.current())`.
To have access to something like Math.trunc() you would use the second variant, unless there is a matching DQL query function found in this list.
The error message you list though, is related to Math.trunc() not being defined in the inline DQL query context. There is a round() defined though, but in order to eliminate the rounding effect, you could do something like: