> For the complete documentation index, see [llms.txt](https://fivesobes.gitbook.io/nexorm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivesobes.gitbook.io/nexorm/operators/update-operators/number-operators/usdtrunc.md).

# $trunc

Update records by setting the value of a numeric column to its truncated value, removing any digits after the decimal point without rounding. The $trunc method is used to cut off the fractional part of the number, effectively performing a “floor” operation for positive numbers and a “ceiling” operation for negative numbers. For example, if the column value is 3.8, it will be truncated to 3, and if the value is -3.8, it will be truncated to -3. This is useful when you need to discard the fractional part without rounding the number.

```typescript
await Member.$update({
    $where: { 
        age: { 
            $eq: 16 
        } 
    },
    $update: {
        $trunc: {
          age: 2
        }
    }
});
```
