transformations:convert
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
transformations:convert [2018/01/23 00:04] – Added "See also" dmitry | transformations:convert [2023/10/05 17:00] – [Text to Date settings] dmitry | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Convert Data Types ===== | + | {{ transformations: |
- | + | ====== CONVERT DATA TYPE ====== | |
- | This transformation converts values of one type (e.g. text) to another type (e.g. number). There are 3 modes: | + | Category: Transform / Basic\\ |
+ | \\ | ||
+ | =====Description===== | ||
+ | This action converts values of one type (e.g. text) to another type (e.g. number). There are 4 modes:\\ | ||
+ | \\ | ||
====Text to date==== | ====Text to date==== | ||
- | In this mode text values that look like a date are converted into number dates. A date format must be specified. All text values that match the specified format are converted to number dates. | + | In this mode, text values that look like a date are converted into number dates. A date format must be specified. All text values that match the specified format are converted to number dates. |
+ | The format notation is the same as for the [[syntax:functions: | ||
- | Format: M/d/yyyy | + | \\ |
+ | ====Text to number==== | ||
+ | In this mode, text values that look like a number are converted into numbers.\\ | ||
- | ^ Before (text) ^ After ^ Comment ^ | + | \\ |
- | | 12/ | + | ====Everything to text==== |
- | | 12-31-2017 | + | In this mode, text values remain unchanged and non-text values are converted into text. Numbers are formatted |
- | The format notation is the same as for the [[syntax: | + | \\ |
+ | ====Empty to text or a number==== | ||
+ | In this mode, empty values are replaced with the static text or number value specified.\\ | ||
- | ====Text to number==== | + | \\ |
- | In this mode text values | + | =====Use cases===== |
+ | * Convert | ||
+ | * Convert | ||
+ | * Recode " | ||
- | Decimal separator: Point | + | \\ |
- | ^ | + | =====Action settings===== |
- | | 1000 | + | ^Setting^Description^ |
- | | 1, | + | |Columns to convert|Select the column(s) from the dataset to apply the value conversion to.| |
- | | 10.00 | + | |Conversion|Select the conversion mode to use. Options: |
- | | $1000 | + | |If conversion |
+ | \\ | ||
+ | ====Text to Date settings==== | ||
+ | ^Setting^Description^ | ||
+ | |Format< | ||
+ | < | ||
+ | \\ | ||
+ | ====Text to Number settings==== | ||
+ | ^Setting^Description^ | ||
+ | |Decimal separator|Select what character is used to define decimal places in the source text values. | ||
+ | |Thousand separator|Select what character is used to define thousands places in the source | ||
+ | \\ | ||
+ | ====Everything to Text settings==== | ||
+ | ^Setting^Description^ | ||
+ | |Number format|Select the output format for the converted text values (e.g., selecting " | ||
+ | \\ | ||
+ | ====Empty to text or number | ||
+ | ^Setting^Description^ | ||
+ | |Value< | ||
+ | < | ||
- | ====Everything to text==== | + | \\ |
- | In this mode text values remain unchanged and non-text values are converted into text. Numbers are formatted | + | =====Examples===== |
+ | |||
+ | **Text to date example: | ||
+ | |||
+ | > Format: M/d/yyyy | ||
+ | |||
+ | ^Before (text) ^After ^Comment ^ | ||
+ | |12/31/2017 | 43100 | Corresponds to December 31st, 2017. | | ||
+ | |12-31-2017 |12-31-2017 | ||
+ | |||
+ | \\ | ||
+ | **Text to number example: | ||
+ | |||
+ | > Decimal separator: Point | ||
+ | |||
+ | ^Before (text) ^After ^Comment ^ | ||
+ | | 1000 | 1000 | | | ||
+ | | 1,000 |1,000 | No conversion happened as the text value has different decimal separator. | | ||
+ | | 10.00 | 10 | | | ||
+ | | $1000 |$1000 | No conversion happened | ||
+ | |||
+ | \\ | ||
+ | **Everything to text example:** | ||
+ | |||
+ | ^Format | ||
+ | | 100% | 10|1000% | | ||
+ | | 1' | ||
+ | | yyyy/ | ||
- | Number | + | \\ |
+ | ====Community examples==== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | ^ Before | + | \\ |
- | | 10 | 1000% | | | + | =====Shortcuts===== |
- | | $1000 | $1000 | No conversion happened as the value is not a number. | | + | Fast ways to create |
- | | ABcd | ABcd | No conversion | + | |
- | | TRUE | TRUE | Booleans are converted to text. | | + | |
- | |# | + | |
- | | 43100 | 4310000% | + | |
- | **See also** | + | \\ |
- | * [[syntax: | + | =====See also===== |
+ | * [[syntax: | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: |
transformations/convert.txt · Last modified: 2023/10/05 17:01 by dmitry