---
title: "cast to value · RUAL Documentation"
description: "Converts the given number into a value."
canonical: https://docs.rual.nl/block-types/type%20casting/number_convert_to_value
language: en
---

# cast to value

This block is part of the [`type casting`](https://docs.rual.nl/block-types/type%20casting) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

Converts the given number into a value.

- Number required `number` The number to be converted into a value.

- Value `value` The converted output value.

A typical wiring for [cast to value](https://docs.rual.nl/block-types/type%2520casting/number_convert_to_value): [get lat / lon](https://docs.rual.nl/block-types/geopoint/geo_point_to_lat_lng) feeds the `number` pin; the `value` out pin feeds [concatenate values](https://docs.rual.nl/block-types/value/value_concatenate).

![Studio canvas example for the cast to value block: typical wiring for cast to value.](https://docs.rual.nl/canvas-examples/number_convert_to_value.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [concatenate values](https://docs.rual.nl/block-types/value/value_concatenate): this block feeds into it.

- [get lat / lon](https://docs.rual.nl/block-types/geopoint/geo_point_to_lat_lng): feeds into this block. Returns the latitude and longitude of a given geo point.

- [set](https://docs.rual.nl/block-types/redis/function_redis_cache_set_key): this block feeds into it. Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.

- [get unixtimestamp](https://docs.rual.nl/block-types/date/number_from_date): feeds into this block. Get the Unix timestamp of the given date.

- [random between](https://docs.rual.nl/block-types/number/number_random_between): feeds into this block. Generates a random number between, including, the given two numbers. This number will be an integer (e.g. 1, 2, 3) without decimals.

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

- [Back to `type casting`](https://docs.rual.nl/block-types/type%20casting): Return to the main group to view all sub-groups

- [Back to `number`](https://docs.rual.nl/block-types/type%20casting?group=number): Return to the group to view all blocks within this group
