New to Telerik UI for WinFormsStart a free 30-day trial

Functions Reference

Updated on May 7, 2026

RadExpressionEditor provides a set of built-in functions organized into the following categories: Text, Aggregate, Date-Time, Logical, Math, and Other (Conversion). Each function is called by name in uppercase, followed by its arguments in parentheses.

All functions are case-insensitive. SUM(), Sum(), and sum() are equivalent.

Text Functions

Text functions perform string manipulation operations.

FunctionSyntaxReturn TypeDescription
TOSTRTOSTR(Object)stringReturns a string representation of an object.
TRIMTRIM(String)stringRemoves whitespace from the beginning and end of a string.
LENLEN(String)intReturns the number of characters in a string.
FORMATFORMAT(FormatString, Value)stringReplaces the format item in a string with the text equivalent of a value. Uses .NET composite format strings, for example FORMAT('{0:C}', [Price]).
SUBSTRSUBSTR(String, StartIndex, Length)stringRetrieves a substring starting at the specified zero-based character position with the specified length.
INSERTINSERT(String1, StartIndex, String2)stringInserts String2 into String1 at the zero-based position specified by StartIndex.
LOWERLOWER(String)stringReturns the string converted to lowercase.
UPPERUPPER(String)stringReturns the string converted to uppercase.
PADLEFTPADLEFT(String, TotalLength)stringRight-aligns the characters in the string by padding its left side with spaces up to the specified total length.
PADRIGHTPADRIGHT(String, TotalLength)stringLeft-aligns the characters in the string by padding its right side with spaces up to the specified total length.
REMOVEREMOVE(String, StartIndex, Count)stringDeletes the specified number of characters from the string, beginning at the specified zero-based position.
REPLACEREPLACE(String, OldValue, NewValue)stringReturns a copy of String in which all occurrences of OldValue are replaced with NewValue.

Examples:

  • LOWER([ProductName])
  • SUBSTR([ProductName], 0, 3)
  • FORMAT('{0:N2}', [UnitPrice])
  • REPLACE([Description], 'old', 'new')
  • TRIM([CustomerName])
  • LEN([ProductName])
  • INSERT([Code], 0, 'PRD-')

Aggregate Functions

Aggregate functions compute a single value from a column across all rows. Pass a column reference as the argument.

FunctionSyntaxReturn TypeDescription
SUMSUM([ColumnName])numericComputes the sum of values in the specified column.
AVGAVG([ColumnName])numericComputes the average of values in the specified column.
MINMIN([ColumnName])variesReturns the minimum value in the specified column.
MAXMAX([ColumnName])variesReturns the maximum value in the specified column.
COUNTCOUNT([ColumnName])intReturns the number of values in the specified column.
FIRSTFIRST([ColumnName])variesReturns the first value in the specified column.
LASTLAST([ColumnName])variesReturns the last value in the specified column.

Examples:

  • SUM([UnitPrice])
  • AVG([Quantity])
  • COUNT([OrderID])
  • MAX([OrderDate])
  • MIN([UnitPrice])

Date-Time Functions

Date-Time functions create, modify, and extract components from DateTime values.

Getting the Current Date and Time

FunctionSyntaxReturn TypeDescription
NOWNOW()DateTimeReturns the current system date and time expressed as local time.
TODAYTODAY()DateTimeReturns the current date at midnight (time portion is 00:00:00).
UTCNOWUTCNOW()DateTimeReturns the current system date and time expressed as Coordinated Universal Time (UTC).

Adding Time Intervals

FunctionSyntaxReturn TypeDescription
ADDDAYSADDDAYS(DateTime, DaysToAdd)DateTimeReturns a date-time value offset by the specified number of days.
ADDHOURSADDHOURS(DateTime, HoursToAdd)DateTimeReturns a date-time value offset by the specified number of hours.
ADDMINUTESADDMINUTES(DateTime, MinutesToAdd)DateTimeReturns a date-time value offset by the specified number of minutes.
ADDSECONDSADDSECONDS(DateTime, SecondsToAdd)DateTimeReturns a date-time value offset by the specified number of seconds.
ADDMILLISECONDSADDMILLISECONDS(DateTime, MillisecondsToAdd)DateTimeReturns a date-time value offset by the specified number of milliseconds.
ADDTICKSADDTICKS(DateTime, TicksToAdd)DateTimeReturns a date-time value offset by the specified number of ticks.
ADDMONTHSADDMONTHS(DateTime, MonthsToAdd)DateTimeReturns a date-time value offset by the specified number of months.
ADDYEARSADDYEARS(DateTime, YearsToAdd)DateTimeReturns a date-time value offset by the specified number of years.
ADDTIMESPANADDTIMESPAN(DateTime, TimeSpan)DateTimeReturns a date-time value offset by the specified TimeSpan.

Calculating Date Differences

These functions return the difference between two dates in the specified unit.

FunctionSyntaxReturn TypeDescription
DATEDIFFDAYDATEDIFFDAY(StartDate, EndDate)doubleReturns the number of day boundaries between two dates.
DATEDIFFHOURDATEDIFFHOUR(StartDate, EndDate)doubleReturns the number of hour boundaries between two dates.
DATEDIFFMINUTEDATEDIFFMINUTE(StartDate, EndDate)doubleReturns the number of minute boundaries between two dates.
DATEDIFFSECONDDATEDIFFSECOND(StartDate, EndDate)doubleReturns the number of second boundaries between two dates.
DATEDIFFMILLISECONDDATEDIFFMILLISECOND(StartDate, EndDate)doubleReturns the number of millisecond boundaries between two dates.
DATEDIFFTICKDATEDIFFTICK(StartDate, EndDate)longReturns the number of tick boundaries between two dates.

Extracting Date-Time Components

FunctionSyntaxReturn TypeDescription
GETDATEGETDATE(DateTime)DateTimeExtracts the date portion (time set to midnight).
GETDAYGETDAY(DateTime)intExtracts the day of the month (1-31).
GETDAYOFWEEKGETDAYOFWEEK(DateTime)DayOfWeekExtracts the day of the week.
GETDAYOFYEARGETDAYOFYEAR(DateTime)intExtracts the day of the year (1-366).
GETHOURGETHOUR(DateTime)intExtracts the hour component (0-23).
GETMINUTEGETMINUTE(DateTime)intExtracts the minute component (0-59).
GETSECONDGETSECOND(DateTime)intExtracts the second component (0-59).
GETMILLISECONDGETMILLISECOND(DateTime)intExtracts the millisecond component (0-999).
GETMONTHGETMONTH(DateTime)intExtracts the month component (1-12).
GETYEARGETYEAR(DateTime)intExtracts the year component.
GETTIMEOFDAYGETTIMEOFDAY(DateTime)longExtracts the time of day expressed in ticks.

Examples:

  • ADDDAYS([OrderDate], 30)
  • DATEDIFFDAY([OrderDate], NOW())
  • GETYEAR([OrderDate])
  • GETMONTH([ShippedDate])
  • ADDMONTHS(TODAY(), -6)

Logical Functions

FunctionSyntaxReturn TypeDescription
IIFIIF(BooleanExpression, TruePart, FalsePart)objectEvaluates BooleanExpression and returns TruePart if true, or FalsePart if false.
ISNULLISNULL(Value, ReplacementValue)objectReturns Value if it is not null. Otherwise, returns ReplacementValue.

Examples:

  • IIF([UnitPrice] > 100, 'Expensive', 'Affordable')
  • ISNULL([ShippedDate], #01/01/2000#)
  • IIF([Quantity] > 0 AND [UnitPrice] > 0, [Quantity] * [UnitPrice], 0)

Math Functions

FunctionSyntaxReturn TypeDescription
ABSABS(Value)numericReturns the absolute value of a number.
CEILINGCEILING(Value)numericReturns the smallest integer greater than or equal to the specified number.
FLOORFLOOR(Value)numericReturns the largest integer less than or equal to the specified number.
ROUNDROUND(Value)decimalRounds the value to the nearest integer.
SIGNSIGN(Value)intReturns +1, 0, or -1 indicating the sign of the number.
SQRTSQRT(Value)doubleReturns the square root of a number.
POWERPOWER(Base, Exponent)doubleReturns a number raised to the specified power.
EXPEXP(Value)doubleReturns e raised to the specified power.
LOGLOG(Value)doubleReturns the natural (base e) logarithm of a number.
LOG10LOG10(Value)doubleReturns the base-10 logarithm of a number.
BIGMULBIGMUL(Value1, Value2)longReturns a 64-bit integer containing the full product of two 32-bit integers.
RNDRND()doubleReturns a random number greater than or equal to 0.0 and less than 1.0.
SINSIN(Radians)doubleReturns the sine of the specified angle in radians.
COSCOS(Radians)doubleReturns the cosine of the specified angle in radians.
TANTAN(Radians)doubleReturns the tangent of the specified angle in radians.
ASINASIN(Value)doubleReturns the angle in radians whose sine is the specified value.
ACOSACOS(Value)doubleReturns the angle in radians whose cosine is the specified value.
ATANATAN(Value)doubleReturns the angle in radians whose tangent is the specified value.
SINHSINH(Radians)doubleReturns the hyperbolic sine of the specified angle in radians.
COSHCOSH(Radians)doubleReturns the hyperbolic cosine of the specified angle in radians.
TANHTANH(Radians)doubleReturns the hyperbolic tangent of the specified angle in radians.

Examples:

  • ABS([Quantity] - [Expected])
  • ROUND([UnitPrice] * 1.1)
  • POWER([Value], 2)
  • SQRT([Area])
  • CEILING([Total] / 10)

Conversion Functions

Conversion functions convert an expression to a specific .NET data type.

FunctionSyntaxReturn TypeDescription
CINTCINT(Expression)System.Int32Converts the expression to a 32-bit integer.
CDBLCDBL(Expression)System.DoubleConverts the expression to a double-precision floating-point number.
CBOOLCBOOL(Expression)System.BooleanConverts the expression to a Boolean value.
CDATECDATE(Expression)System.DateTimeConverts the expression to a DateTime value.
CSTRCSTR(Expression)System.StringConverts the expression to a string value.

Examples:

  • CINT([Quantity])
  • CDBL([UnitPrice]) * 1.5
  • CDATE('2025-01-15')
  • CSTR([ProductID])
  • IIF(CBOOL([IsActive]), 'Active', 'Inactive')

See Also