Non-aggregate functions

<< Click to Display Table of Contents >>

Current:  Appendix 

Non-aggregate functions

Previous pageReturn to chapter overviewNext page

Description: Non-aggregate functions support user-defined functions

Functions

Descriptions

isNumber(Object val)

Judge whether the given parameter is a number

isDate(Object val)

Determine if the given parameter is a date

Position (longitude :int, latitude :int)

Convert longitude and latitude to a long for storage, which can be used as input parameters for GIS inrect and inCircle

formatDate(Object val, String pattern)

Convert dates to strings in the specified format

parseDate(Object val, String pattern)

Convert a string to a date in the specified format

dateAdd(Object date, String field, int interval)

According to the specified Field modification date, a reasonable field parameter are "year", “quarter”, “month”,“weekofyear”,   “dayofyear”, ”dayofmonth”, “dayofweek”, “hour”,“minute”, “second”

dateGap(Object date1, Object date2,String field)

The date is calculated according to the specified Field interval. A reasonable field parameter are ”year”, “quarter”, “month”,“weekofyear”, “dayofyear”,”dayofmonth”, “dayofweek”, “hour”,“minute”, “second”

datePart(Object date, String field)

Returns the value of the Field specified by the date. Reasonable field parameters are "year", "quarter", "month", "weekofyear", "dayofyear", "dayofmonth", "dayofweek", "hour", "minute", " Second"

trim (String str)

Remove the spaces before and after the string

substring(String str, Integer idx, Object end))

Returns a substring of the first argument starting at the position specified by the second argument to the length specified by the third argument

formatNumber (double num, String pattern)

Convert a number to a specified string

indexOf (String src, String key, Object fromIdx)

Finding substring position in the specified string

sqr (Object val)

Return square

sqrt (Object val)

Returns square root

abs(Object val)

Return absolute value