It parses a date using a custom format, optionally specifying time zone and locale. Format must be specified using the following patterns:

Format patterns

YY YYYY

Year (15, 2015)

M MM MMM MMMM

Month (7, 07, Jul, July)

D DD

Day in month (9, 09)

H HH

Hour (0...23, 00...23)

h hh

Hour (1...12, 01...12)

A

AM/PM

m mm

Minute (0...59, 00...59)

s ss

Second (0...59, 00...59)

S SSS

Millisecond (0...999, 000...999)

GG GGGG

Weekyear (15, 2015)

W WW

Week of weekyear (1...53, 01...53)

ZZ

TimeZone offset (-0700, ...+0700)

To introduce a literal, the letters must be escaped. Escaping is done inserting the text in a '[', ']' pair. For example, [abc] → abc . Numbers and other symbols may or may not be escaped.

In the case of '[' and ']' symbols, the escaping rules are more complex. '[' only opens an escaped block if there is a closing ']' symbol before any other ']'. A closing ']' only closes an escaped block if there is no other closing ']' before the next opening '['.

The format must contain a year pattern.

If the format used does not adjust to this description, the result of the operation is not specified.

10. Regular expression

Description

Builds a regular expression from the given string pattern.

Format

re(arg_1) → result

arg_1 : String

result : Regexp

Examples

Example 1

re('a*')

arg_1 : a*

result : a*

Example 2

re('^([^@]+)@(.+)$')

arg_1 : ^([^@]+)@(.+)$

result : ^([^@]+)@(.+)$

11. Timestamp

Description

Converts an integer or a valid string (epoch) into normal date format. The string valid format should be Year-Month-Day Hour:Minute:Second.Millisecond, where all the fields are numbers. Epoch date should be in milliseconds.

Format

timestamp(arg_1) → result

arg_1 : Integer or String

result : Timestamp

Examples

Example 1

timestamp("2017-01-23 13:10:15.123")

arg_1: 2017-01-23 13:10:15.123

result : 2017-01-23 13:10:15.123

Example 2

timestamp("2017-02-01 00:59:59")

arg_1 : 2017-02-01 00:59:59

result : 2017-02-01 00:59:59.0

If a date string doesn't follow the specified format, it can also be converted to timestamp using parsedate.

12. Template

Description

Builds a template from the given string definition. A template is a replacement string that also admits capturing groups (for example \1 will use the capturing group 1 as a template).

Format

template(arg_1) → result

arg_1 : String

result : Template

Examples

Example 1

template("name")

arg_1 : name

result : name

Example 2

template("***")

arg_1 : ***

result : **

Example 3

template("\1\2")

arg_1 : \1\2

result : \1\2

13. To Float

Description

Converts a valid number string or an integer into a float number.

Format

float(arg_1) → result

arg_1 : String or Integer

result : Float

Examples

Example 1

float("123456.1234")

arg_1 : 123456.1234 — String

result : 123456.1234

Example 2

float("1234ABC")

arg_1 : 1234ABC — String

result : null

Example 3

float(1234)

arg_1 : 1234 — Integer

result : 1234

14. To IP

Description

Converts a valid string or integer into an IP address (IPv4)

Format

ip4(arg_1) → result

arg_1 : String or Integer

result: IP address

Examples

Example 1

ip4("10.0.0.1")

arg_1 : "10.0.0.1"

result : 10.0.0.1

Example 2

ip4("1234abc")

arg_1 : 1234abc

result: null

Example 3

ip4("400.123.1.1")

arg_1 : 400.123.1.1

result: null

Example 4

ip4(167772161)

arg_1 : 167772161

result : 10.0.0.1

Example 5

ip4(3627733955)

arg_1 : 3627733955

result : 216.58.211.195

15. To Image

Converts a string into an image.

16. To Int

Description

Converts a valid number string or a float into a integer number. Please note that float numbers are not rounded, so the result will be the integral part.

Format

int(arg_1) → result

arg_1 : String or Float

result : Integer

Examples

Example 1

int("123456")

arg_1 : 123456 — String

result : 123456

Example 2

int("1234ABC")

arg_1 : 1234ABC — String

result : null

Example 3

int(1234.999)

arg_1 : 1234.999 — Float

result : 1234

Example 4

int(1234.11)

arg_1 : 1234.11 — Float

result : 1234

17. To UTF8

Description

Creates a byte array from an UTF8 string. Please check above the make byte array function, for more information on byte array.

Format

toutf8(arg_1) → result

arg_1 : String

result : byte array

Examples

Example 1

toutf8("abc")

arg_1 : abc

result : 616263

Example 2

toutf8("hello world")

arg_1 : hello world

result : 68656C6C6F20776F726C64

18. To Z85, base85

Description

Returns a Z85 string from the given byte array. Please check above the make byte array function, for more information on byte array.

Format

toz85(arg_1) → result

arg_1 : byte array

result : String

Examples

Example 1

toz85(616263)

arg_1 : 616263

result : axtD

Example 2

toz85(68656C6C6F20776F726C64)

arg_1 : 68656C6C6F20776F726C64

result : xK#0@zY<mxch)^

19. To base16, b16, hex

Description

Returns a hexadecimal (base16) string from the given byte array. Please check above the make byte array function, for more information on byte array.

Format

to16(arg_1) → result

arg_1 : byte array

result : String

Examples

Example 1

to16(616263)

arg_1 : 616263

result : 616263

Example 2

to16(4A4B4C)

arg_1 : 4A4B4C

result : 4A4B4C

20. To base64, b64

Description

Returns a base64 string from the given byte array. Please check above the make byte array function ,for more information on byte array.

Format

to64(arg_1) → result

arg_1 : byte array

result : String

Examples

Example 1

to64(616263)

arg_1 : 616263

result : YWJj

Example 2

to64(68656C6C6F20776F726C64)

arg_1 : 68656C6C6F20776F726C64

result : aGVsbG8gd29ybGQ=

21. To string

Description

Converts an integer, float, date, ip address and coordinates into a string.

Format

str(arg_1) → result

arg_1 : Integer, Float, Timestamp, IP, Geocoord

result : String

Examples

Example 1

str(int("123"))

arg_1: int("123")

result : 123

Example 2

str(float("123.456"))

arg_1: float(123.456)

result : 123

Example 3

str(timestamp("2017-02-01 00:59:59"))

arg_1 : timestamp(2017-02-01 00:59:59)

result : 2017-02-01 00:59:59.0

Example 4

str(ip4("192.168.1.1"))

arg_1: ip4("192.168.1.1")

result : 192.168.1.1

Example 5

str(geocoord("40°24'46.2\"N 3°41'43.8\"W"))

arg_1: geocoord("40°24'46.2\"N 3°41'43.8\"W")

result : 40°24′46.2″N 3°41′43.8″W

Most of these conversions are implicit while using the operations dialogue box, so there is no need to do them explicitly or if the selected column has one of the supported types.