* * *
String functions can be used to manipulate a string or extract any information needed. Following are the string functions available in analytic applications.
Some of the commonly used string functions are:
- includes() – determines whether one string may be found inside another string by returning true or false.
- indexof() – returns the index of first occurrence of a specified string within another string.
- length() – returns the number of characters in a string.
- replace() – replaces the main string with some or all matches of a pattern specified.
- split() – splits and returns an array of string based on the specified pattern.
- substring() – returns a subset of the main string between one index and another.
- toLowercase() & toUpperCase() – converts the string to lower case and upper case respectively.
We have a comprehensive list of Math functions in analytic applications.
Following are the array functions available in analytic applications.
Some of the commonly used array functions are:
- fill() – fills all elements of an array with a specified value.
- pop() – removes the last element from the array and then returns it.
- push() – appends one element at the end of the array and returns the new length of the array.
- shift() – removes the first element from the array and then returns it.
- splice() – changes the content of an array, adding new elements while removing old elements.
There are three date functions – now, parse and UTC. All three functions return values in milliseconds.
- now() – returns the number of milliseconds elapsed till current date since January 1, 1970, 00:00:00 UTC.
- parse() – parses the specified string into date and then returns the number of milliseconds elapsed till that date since January 1, 1970, 00:00:00 UTC.
- UTC() – returns the number of milliseconds elapsed till the specified date since January 1, 1970, 00:00:00 UTC.
There are four conversion functions available in analytic applications. They are used to convert an integer or a number to a string and vice versa.
* * *
In the subsequent blog, we will explore how to leverage Global Variables in analytic applications.
Reach out to us here today if you are interested to evaluate if SAP Analytics Cloud is right for you.