Returns the digit `i`

characters from the right side of a value, which must be an integer.

#### Variable

num = 6789

#### Template

{{ num|get_digit:1 }}, {{ num|get_digit:2 }}, {{ num|get_digit:3 }}, {{ num|get_digit:4 }}

#### Result

9, 8, 7, 6

**Argument:** `i`

(required)
– the position from the right of the number.

Returns the digit `i`

characters from the right side of a value, which must be an integer.

num = 6789

{{ num|get_digit:1 }}, {{ num|get_digit:2 }}, {{ num|get_digit:3 }}, {{ num|get_digit:4 }}

9, 8, 7, 6

Did we get something wrong? Is there a use case for the
`get_digit`

filter that we should add?
Please let us know.

Official Documentation

This page last updated on March 6, 2021, 6:12 a.m. EST

This page last updated on March 6, 2021, 6:12 a.m. EST

## Commentary

It is hard to think of a use case for this one.