Visual Basic ODBC Scalar Functions


The following lists the Visual Basic ODBC scalar functions and their ANSI equivalents.

VBAANSIDescription
&Concatconcatenate two strings
\integer division
^Powerexponentiation
AbsAbsabsolute value
Andbitwise and
AscAsciiconverts a single char to an ASCII numeric value
AtnAtanarc tangent of angle
CBoolconverts to boolean value
CCurconverts to currency value
CDateconverts to date-time value
CDblconverts to double precision value
ChrCharconverts an ASCII numeric value to a single char
CIntconverts to signed short integer value
CLngconverts to signed long integer value
CosCoscosine of angle
CSngconverts to single precision value
CStrconverts to string
CVarconverts to variant
CVDateconverts to variant, subtype date
DateCurrent_Datecurrent date
DatePartextract part of a date
DateSerialconverts a date to a numeric value
DateValueconverts a numeric value to a date
DayDayOfMonthnumeric day of month
ExpExpnatural exponentiation
Fixtruncate towards zero
Formatgeneric formatter
Hexconverts to string using base 16
HourHournumeric hour of day
IIftwo pronged conditional
InStrLocatesearches for a substring
IntFloorgreatest integer less than or equal
IsDatereturns true for valid date values
IsNullreturns true for null values
IsNumericreturns true for numeric values
LCaseLCaselowercase string
LeftLeftsubstring from left side of a string
LenChar_Lengthlength in characters of string
LogLognatural logarithm
LTrimLTrimtrims whitespace from left side of string
MidSubStringmiddle part of string extraction
MinuteMinutenumeric minute of hour
ModModmodulo of x base y
MonthMonthnumeric month value
Notbitwise one's complement
NowCurrent_Timestampcurrent date and time
Octconverts to string using base 8
Orbitwise (inclusive) or
RGBconverts separate R, G, B to a color value
RightRightsubstring from right part of string
RndRandrandom value
RoundRoundround to an integer value
RTrimRTrimtrims whitespace from right side of string
SecondSecondnumeric second value
SgnSignarithmetic sign of value
SinSinsine
SpaceSpacegenerate n spaces
SqrSqrtsquare root
Strconverts a numeric values to a string
StrCompcompares two strings
StringRepeatgenerates n repeated characters
Switchmultiple condition/values conditional
TanTantangent of angle
TimeCurrent_Timecurrent time
TimeSerialconverts a time to a numeric value
TimeValueconverts a numeric value to a time
Trimtrims whitespace of string
UCaseUCaseuppercase string
Valconverts a string to a numeric value
WeekdayDayOfWeeknumeric day of week
Xorbitwise exclusive or
YearYearnumeric year value