How do you post a number range to the database

Does anyone know how to pre-format a number range so that i can post the range to the numeric range field. I need to find the number of days for 2 dates, convert them to a range such as [22,33] and then post that to a field. How do you pre-format the range so that it can be stored in the field. I keep getting red red red so i am not sure how to do that.

There’s an operator for that. Looks like this:

<- range ->