User Tools

Site Tools


syntax:functions

List of functions


Number functions

FunctionDescription
AbsReturns the absolute value of a number which is the distance of a number on the number line, from 0, without considering which direction the number lies
ACosReturns the arccosine - the angle, in radians, of the specified cosine.
ArcTanReturns the angle, in radians, whose tangent is the quotient of the arguments.
ASinReturns the arcsine - the angle, in radians, of the specified sine.
ATanReturns the arctangent - the angle, in radians, of the specified tangent.
CeilingRounds the specified number up to the nearest integer - or full, non-fractional number - towards positive infinity.
CosReturns the cosine of the angle specified in radians.
DivReturns the quotient of the two number arguments.
ExpRaises the mathematical constant e to the power of the specified argument.
FloorRounds the specified number down to the nearest integer - or full, non-fractional number - towards negative infinity.
IsEvenTests if the specified number is even and returns Boolean TRUE if so, or FALSE if not.
IsOddTests if the specified number is odd and returns Boolean TRUE if so, or FALSE if not.
LogReturns the natural logarithm of the specified number.
MaxReturns the largest of the two arguments.
MinReturns the smallest of the two arguments.
MRoundRounds the specified number to the specified multiple.
PiReturns the value of Pi (π): 3.1415926535897932384626433833…
PowRaises a number to the power of the specified power.
RandBetweenGenerates a random integer between two numbers.
RandomGenerates a random number between 0 and 1.
RemReturns the remainder of the quotient of the two specified numbers.
RoundRounds a number to the specified number of decimal digits.
RoundXLRounds a number to the specified number of decimal digits using the Excel rounding logic.
SignDetermines whether the specified number is positive, negative, or zero. If positive the value 1 is returned. If negative, the value -1 is returned. If 0, then 0 is returned.
SinReturns the sine of the angle specified in radians.
SqrtReturns the square root of the specified number.
SquareReturns the square of the specified number.
TanReturns the tangent of the angle specified in radians.
TruncateReturns the integer part of the specified number.


Text functions

Note that all text functions that return a text value automatically convert their arguments into text.

FunctionDescription
CharReturns the ASCII character associated with the specified character code.
CodeReturns the UTF-8 code (from 0 to 2047) of the first character of the specified text.
CompactRemoves repeating whitespace from the specified text, reducing it to a single space.
ContainsDetermines whether text contains the specified search string.
DistanceThis function returns the edit distance between the two specified text strings calculated as the Damerau-Levenshtein distance.
EndsWithA search function used to check if a string ends with a specific text value .
FindFinds the exact position of a specified string within the specified text and returns the position of the first character.
IsRegExMatchDetermines if the specified text matches a regular expression ("RegEx") pattern.
KeepAfterReturns the characters after the first occurrence of a string in the specified text.
KeepBeforeReturns the characters before the first occurrence of a string in the specified text.
KeepBetweenReturns the characters between the first occurrence of a string and the first occurrence of a second string in the specified text.
KeepCharsKeeps only the characters given in a string list and removes the others from the specified text.
LeftReturns the specified number of characters from the left of the specified text as a text value.
LenReturns the number of characters (length) in the specified text value.
LineBreakReturns the line break character (in Windows).
LowerReturns the specified text converted to lowercase letters.
MidReturns a substring of text from the specified text, a given number of characters long, and starting with the character at a given staring position.
MirrorReturns a string with the reverse order of characters as the specified text.
PadStartPads the beginning of a text string with a specified string up to a total length.
PadEndPads the end of a text string with a specified string up to a total length defined.
ParseFloatParses a number in scientific notation (specified as a text value) into a decimal number.
ProperConverts the specified text to the proper case (or "title case").
QuoteReturns a single quote character (').
RegExMatchReturns the first substring that matches the specified regular expression pattern.
RegExReplaceReplaces the first substring within the given text that matches the specified regular expression pattern (regex_text) with the given replacement string.
RemoveRemoves a substring from the specified text, a given number of characters long, and starting with the character at a given staring position.
RemoveCharsRemoves individual characters from the specified text.
RemoveEndReturns text excluding the last specified number of characters, including spaces and non-printing characters.
RemoveStartReturns text excluding the first specified number of characters, including spaces.
RemoveTextRemoves all instances of the specified string from text.
ReplaceReplaces all instances of a specified string with a second specified string within text.
ReplaceBetweenReplaces text between two specified strings.
RightReturns the specified number of characters from the right of a string as a text value.
SanitizeReplaces tabs and line breaks with spaces and removes hidden system characters with ASCII codes 0 to 31 in the specified text.
StartsWithA search function used to check if a string starts with a specific text value.
StripRemoves the first and the last characters from the specified text value.
SubstringCountReturns the number of instances of a string found within the specified text.
TrimTrims off all leading and trailing spaces, and other non-printing characters, from the specified text.
TrimEndTrims off all trailing spaces and other non-printing characters from the specified text.
TrimStartTrims off all leading spaces and other non-printing characters from the specified text.
UpperReturns the specified text converted to uppercase letters.


Logical functions

FunctionDescription
FalseCreates a Boolean value equal to FALSE.
IfEvaluates a condition and returns a specified value if the condition is TRUE, or a second specified value if not.
IfEmptyReturns the result of a second expression if the result of the first expression is empty. Otherwise, it returns the result of the first expression.
IfErrorReturns the result of a second expression if the result of the first expression is an error. Otherwise, it returns the result of the first expression.
InReturns Boolean TRUE if the specified text is found within any of the values listed in a given string list.
IsBooleanReturns TRUE if the result of a given expression is a Boolean (either TRUE or FALSE).
IsEmptyReturns TRUE if the result of a given expression is an empty value.
IsErrorReturns TRUE if the result of a given expression is an error.
IsIntegerReturns TRUE if the result of a given expression is an integer number.
IsNumberReturns TRUE if the result of a given expression is a number.
IsNumericReturns TRUE if the result of a given expression is a number or text that looks like a number.
IsTextReturns TRUE if the result of a given expression is text.
TrueCreates a Boolean value equal to TRUE.
WhenReturns the result of a given expression if a specified condition is TRUE. Otherwise, it returns empty value.


Date/time functions

FunctionDescription
AddHoursAdds the specified number of hours to the given date.
AddMonthsAdds the specified number of months to the given date.
AddYearsAdds specified number of years to the given date.
AgeReturns the number of full years between the two given dates.
AgeMonthsReturns the number of full months between the two given dates.
DateConverts the given date-time, as text, into a date-time value represented as a number (date-time serial value) according to the specified format string.
DayReturns the number of the corresponding day of the month, from 1 through 31, from the given date.
DetectFormatDetects the date/time format of the text date (or timestamp).
FormatConverts the given data-time, as a date serial value, into a date-time text value formatted according to the specified format.
FromUnixTimeConverts the specified Unix timestamp (the number of seconds since Jan 1st, 1970) to the numeric date-time serial value used in EasyMorph (and Excel).
ISOWeekNumberReturns the ISO week number which ranges from 1 to 53 from the specified date.
IsTextDateDetermines if the entered term is a recognizable text date.
IsWeekendReturns TRUE if the given date falls on a weekend day (Saturday or Sunday).
LocalTimeConverts a given UTC date-time into a local date-time.
MakeDateReturns a date serial number based on the specified year, month, and day numeric values.
MonthReturns the corresponding month number, 1 through 12, from the given date.
MonthEndReturns the date serial number of the last day of the month the specified date falls in.
MonthNameReturns the abbreviated (3-letter) name of the month corresponding to the given month number, from 1 to 12.
MonthNameLocalReturns the abbreviated (3-letter) name of the month corresponding to the given month number, from 1 to 12, according to the current regional locale.
MonthStartReturns the date serial number of the first day of the month the specified date falls in.
NowReturns the current date-time as a date serial number.
TodayReturns today's date as a date serial number.
ToUnixTimeConverts the specified EasyMorph (and Excel) date-time serial value to a Unix timestamp (the number of seconds since Jan 1st, 1970).
UTCTimeConverts the given local date-time value into a UTC date-time value.
WeekdayReturns the corresponding day-of-the-week number, from 1 (Sunday) to 7 (Saturday), from the given date.
WeekdayNameReturns the abbreviated name of the day the given date falls on.
WeekEndReturns the date serial number of the last day (Saturday) of the week the specified date falls in.
WeekStartReturns the date serial number of the first day (Sunday) of the week the specified date falls in.
WorkdaysReturns the number of workdays (i.e. all days except Saturday and Sunday) between two specified dates.
YearReturns the year, as a four-digit number, from the given date.
YearDayReturns the number of days since Jan 1st of the date's year.


Financial functions

FunctionDescription
FVCalculates the future value of a loan or an investment, based on a constant interest rate.
IPmtCalculates the payment on the interest for an investment over a given period.
NPerCalculates the number of periods for an investment based on periodic payments and interest rate.
PmtCalculates the periodic payment of an annuity.
PPmtCalculates the payment on the principal for an investment over a given period.
PVCalculates the present value of a loan or an investment, based on a constant interest rate.
RateCalculates the interest rate per period of an annuity.


File functions

FunctionDescription
CombinePathCombines two given paths into one, intelligently dealing with backslashes and relative paths.
DirectoryExtracts the directory path from a specified full file path, excluding the file name.
FilenameExtracts the filename (without extension) from a given full file path.
FileExtensionExtracts the file extension (with dot) from a given full file path.
IsPathRootedDetects if the specified path to a file or folder contains a root.


Web functions

FunctionDescription
CombineURLCombines a specified URL and URL path into one URL.
DecodeDecodes a given text string using one of several decoding methods.
EncodeEncodes a given text string using one of several encoding methods.
HexDecodeConverts the provided hex string into a text value using one of several decoding methods.
HexEncodeConverts the provided text value into a hex string using one of several encoding methods.
HashHexCalculates the hexadecimal hash of the given text value using one of several algorithms.
HMACHexCalculates a keyed hexadecimal hash of the given text value using one several algorithms.
IsEmailDetermines if the given email address string is a properly formatted email address, returning TRUE if so, or FALSE if not.
IsJSONReturns TRUE if the specified argument can be parsed as a JSON object or JSON array.
IsXMLReturns TRUE if the given text is an XML object.
JSONValueExtracts a single value or a JSON object/array from the specified node.
URIDecodeDecodes a given URL string such as an entire URL or just query-string values.
URIEncodeEncodes a given URL string such as an entire URL or just query-string values.
XMLValueExtracts a single value or an XML node from a specified node.


Special functions

FunctionDescription
AsNumberConverts the given expression to a number.
AsTextConverts the given value to text.
CoalesceReturns the first value in the given argument list that is not an empty value.
ColumnExistsTests whether a specified column name exists in the input dataset.
EmptyCreates an empty value.
EvalEvaluates the given text expression as an EasyMorph expression.
ErrorCreates an error value with the specified error text.
GUIDCreates a GUID, similar to the "Generate GUIDs" action.
HashCalculates a 128-bit hash in Base64 encoding from the specified value.
MatchReturns the position index of a given value in a list of specified values, separated by delimiter.
MetadataReturns project metadata - specific details about the project.
PickReturns the value in the specified index position within a given text list, a list of text values separated by delimiter.
SystemReturns the system value specified by the given keyword argument.


:?: If you need a function that is not currently available in EasyMorph please feel free to make a feature request on the Community forum.

syntax/functions.txt · Last modified: 2023/11/24 20:34 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki