pdk.util.Cast

functions to convert variables between different structures

Functions


booleanToString

Converts a boolean value to a string representation.

Arguments:

Result:

Possible exceptions


dateToString

Converts a date object to a string representation using the specified format.

Format examples:

Date and Time PatternResult

'yyyy-MM-dd'

2001-07-04

'YYYY-MM-dd'T'HH:mm:ss'

2001-07-04T12:08:56

'yyyy.MM.dd G 'at' HH:mm:ss z'

2001.07.04 AD at 12:08:56 PDT

'EEE, MMM d, ''yy'

Wed, Jul 4, '01

'h:mm a'

12:08 PM

'hh 'o''clock' a, zzzz'

12 o'clock PM, Pacific Daylight Time

'K:mm a, z'

0:08 PM, PDT

'yyyyy.MMMMM.dd GGG hh:mm aaa'

02001.July.04 AD 12:08 PM

'EEE, d MMM yyyy HH:mm:ss Z'

Wed, 4 Jul 2001 12:08:56 -0700

'yyMMddHHmmssZ'

010704120856-0700

'yyyy-MM-dd'T'HH:mm:ss.SSSZ'

2001-07-04T12:08:56.235-0700

'yyyy-MM-dd'T'HH:mm:ss.SSSXXX'

2001-07-04T12:08:56.235-07:00

'YYYY-\'W\'ww-u'

2001-W27-3

Arguments:

Result:

Possible exceptions


dateToStringISO

Converts a date object to a string representation in ISO format (YYYY-MM-DDTHH:MM:SSZ).

2023-10-20T08:24:45−07:00

Arguments:

Result:

Possible exceptions


integerToFloat

Converts an integer value to a floating-point number.

Arguments:

Result:

Possible exceptions


integerToString

Converts an integer value to a string representation.

Arguments:

Result:

Possible exceptions


integerToDate

Converts an integer value to a date object.

Arguments:

Result:

Possible exceptions


floatToString

Converts a floating-point number to a string representation.

Arguments:

Result:

Possible exceptions


stringToInteger

Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' to indicate a negative value or an ASCII plus sign '+' to indicate a positive value.

Arguments:

Result:

Possible exceptions


stringToFloat

Converts a string representation of a floating-point number to a floating-point number.

Arguments:

Result:

Possible exceptions


stringToBoolean

Parses the string argument as a boolean. The boolean returned represents the value true if the string arguments not null and is equal, ignoring case, to the string "true".

Arguments:

Result:

Possible exceptions


stringToDateISO

Converts string to date by using ISO format: YYYY-MM-DDTHH:MM:SSZ (2023-10-20T08:24:45−07:00).

Arguments:

Result:

Possible exceptions

Last updated