The data types available for conversion are further described here.
Function |
Description |
Base64Decode(Arg1) |
Decodes a base64 string into a binary large object so it can be viewed as an image in Spotfire.
Example: Base64Decode([Column]) |
Base 64Encode(Arg1) |
Encodes a binary large object as a base64 string. This might be of interest if data from Spotfire is to be exported to other applications.
Example: Base64Encode([Column]) |
Boolean(Arg1) |
Converts the column or value to a Boolean. Example: Boolean([Column]) |
Cast(Arg1 as type) |
Casts any expression to any type (except Null/Undefined). Invalid values are propagated. Casting performed for different types of input and output types results in different outputs. See Cast Method for more information.
Example: Cast([IntegerColumn] as Currency) |
Currency(Arg1) |
Converts the column or value to a Currency.
Example: Currency([Column]) |
Date(Arg1, ..., Arg3) |
Converts the column or values to a Date. If a single argument is used, Arg1 can be of type String, DateTime or Integer. If a String is specified, the date must be written in a format that Spotfire can recognize. Additionally, all parts of the date (year, month and day) must be present. If a DateTime is specified, the time part is removed. If three arguments are given, they must be Integer values. The first argument is the year, the second is the month and the third is the day of the month. If a single Integer argument is given, the Date function will interpret the Integer as ticks. Ticks are counted with the unit 100 nanoseconds, starting from the date 01-01-01 (January first, year one). See also Date and Time functions and Cast Method.
Examples: Date("3/21/03") →
3/21/2003 Date(2003,03, 21) → 3/21/2003 Date(605000000000000000l) → 3/4/1918 (The output formats available are dependent on your current locale.) |
DateTime(Arg1, Arg2, ..., Arg7) |
Converts the column or values to a DateTime. If a single argument is used, Arg1 can be of type String, Date or Integer. If a String is specified, the date must be written in a format that Spotfire can recognize. Additionally, at least all parts of the date (year, month and day) must be present. If a Date is specified, the time part is set to 00:00:00 (12:00:00 AM). If seven arguments are given, they must be Integer values. The first argument is the year, the second is the month, the third is the day of the month, the fourth is the hour, the fifth is the minute, the sixth is the second and the seventh argument is the millisecond. If a single integer argument is given, the DateTime function will interpret the integer as ticks. Ticks are counted with the unit 100 nanoseconds, starting from the date 01-01-01 (January first, year one). See also Date and Time functions and Cast Method.
Examples: DateTime(2003, 03, 21, 11, 37, 00) → 2003-03-21 11:37:00 DateTime(605000000000000000l) → 3/4/1918 11:33:20 AM (The output formats available depend on your current locale.) |
Integer(Arg1) |
Converts the column or value to an integer number. If the conversion fails, an error is returned. Arg1 can be of type integer, real or string, and the result is of type integer. Real numbers are truncated, i.e., only the integer part is used.
Examples: Integer(null) → (Empty) |
LongInteger(Arg1) |
Converts the column or value to a LongInteger.
Example: LongInteger([Column]) |
ParseDate(Arg1, ..., Arg3) |
Parses a date from a string to a Date format. The first argument is a string or a string column containing a date. The second argument is a format string explaining how the date is built up and the third (optional) argument is a culture code.
Examples: ParseDate("2013-09-17", "yyyy-MM-dd") ParseDate("17-okt-2013","dd-MMM-yyyy","sv-SE") |
ParseDateTime(Arg1, ..., Arg3) |
Parses date/time information from a string to a DateTime format. The first argument is a string or a string column containing date/time information. The second argument is a format string explaining how the information is built up and the third (optional) argument is a culture code.
Examples: ParseDateTime("2013-09-17 10:30", "yyyy-MM-dd h:mm") ParseDateTime("17-okt-2013 13:25","dd-MMM-yyyy HH:mm","sv-SE") |
ParseTime(Arg1, ..., Arg3) |
Parses a time from a string to a Time format. The first argument is a string or a string column containing a time. The second argument is a format string explaining how the time is built up and the third (optional) argument is a culture code.
Examples: ParseTime("9:25", "h:mm") ParseTime("17:30", "HH:mm","sv-SE") |
Real(Arg1) |
Converts the column or value to a real number. If the conversion fails, an error is returned. Arg1 can be of type integer, real or string, and the result is of type real.
Examples: |
SingleReal(Arg1) |
Converts the column or value to a SingleReal.
Example: SingleReal([Column]) |
Substitutes null values. Returns Arg1 if it is not null, Arg2 otherwise. Arg1 and Arg2 can be of any type, but both must be of the same type or null. The result is of the same type as the arguments.
A common usage is to substitute null values in a column. If Arg1 is a column, Arg2 can be either a value of the same type as the contents of the column or a column with the same content type. If Arg2 is also a column, the error in Arg1 will be replaced with the value from the same row in Arg2.
Examples: SN([Column], 1) →1 (if null value in column) SN([Column1], [Column2]) → (value from Column2 if null value in Column1) |
|
String(Arg1) |
Converts the column or value to a string. This conversion never fails except if Arg1 is null. Arg1 can be of any type and the result is of type string.
Examples: |
Time(Arg1, Arg2,..., Arg4) |
Converts the column or values to a time. If the conversion fails, an error is returned. If a single argument is used, it can be of type String, DateTime or Integer. If a String is specified, the time must be written in a format that Spotfire can recognize. Additionally, both the hour and the minute must be specified. See examples below. If a DateTime is specified, the date part is removed. If four arguments are given, they must be Integer values. The first argument is the hour, the second is the minute, the third is the second and the fourth is the millisecond. If a single Integer argument is given, the Time function will interpret the Integer as ticks. Ticks are counted with the unit 100 nanoseconds, starting from the date 01-01-01 (January first, year one). See also Date and Time functions and Cast Method.
Examples: Time(605000000000000000l) → 11:33:20 AM (The output formats available depend on your current locale.) |
TimeSpan(Arg1, Arg2,...Arg5)) |
Creates a TimeSpan from a column or values. If a single argument is given, the input column can be of type String or TimeSpan. If a String is specified, TimeSpan must be written in the format "[-]d.h:m:s.ms". If five arguments are given, then the first argument is the days, the second is the hours, the third is the minutes, the fourth is the seconds and the fifth is the milliseconds. The first four arguments are integers, the last is a real number.
Examples: TimeSpan([Column]) TimeSpan("247.5:17:11.5002") TimeSpan(247, 05, 17, 11, 500.2) |
See also: