{"id":167,"date":"2018-12-06T10:21:43","date_gmt":"2018-12-06T10:21:43","guid":{"rendered":"https:\/\/barkhane.com\/sql\/2018\/12\/06\/ms-access-functions\/"},"modified":"2024-03-03T17:59:43","modified_gmt":"2024-03-03T17:59:43","slug":"ms-access-functions","status":"publish","type":"post","link":"https:\/\/barkhane.com\/sql\/ms-access-functions\/","title":{"rendered":"MS Access Functions"},"content":{"rendered":"<p class=\"intro\">MS Access Functions has many built-in functions.<\/p>\n<p class=\"intro\">This reference contains the string, numeric, and date functions in MS Access.<\/p>\n<hr \/>\n<h2>MS Access String Functions<\/h2>\n<table class=\"w3-table-all notranslate\">\n<tbody>\n<tr>\n<th><strong>Function<\/strong><\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td><strong>Asc<\/strong><\/td>\n<td>Returns the ASCII value for the specific character<\/td>\n<\/tr>\n<tr>\n<td><strong>Chr<\/strong><\/td>\n<td>Returns the character for the specified ASCII number code<\/td>\n<\/tr>\n<tr>\n<td><strong>Concat with &amp;<\/strong><\/td>\n<td>Adds two or more strings together<\/td>\n<\/tr>\n<tr>\n<td><strong>CurDir<\/strong><\/td>\n<td>Returns the full path for a specified drive<\/td>\n<\/tr>\n<tr>\n<td><strong>Format<\/strong><\/td>\n<td>Formats a value with the specified format<\/td>\n<\/tr>\n<tr>\n<td><strong>InStr<\/strong><\/td>\n<td>Gets the position of the first occurrence of a string in another<\/td>\n<\/tr>\n<tr>\n<td><strong>InstrRev<\/strong><\/td>\n<td>Gets the position of the first occurrence of a string in another, from the end of string<\/td>\n<\/tr>\n<tr>\n<td><strong>LCase<\/strong><\/td>\n<td>Converts a string to lower-case<\/td>\n<\/tr>\n<tr>\n<td><strong>Left<\/strong><\/td>\n<td>Extracts a number of characters from a string (starting from left)<\/td>\n<\/tr>\n<tr>\n<td><strong>Len<\/strong><\/td>\n<td>Returns the length of a string<\/td>\n<\/tr>\n<tr>\n<td><strong>LTrim<\/strong><\/td>\n<td>Removes leading spaces from a string<\/td>\n<\/tr>\n<tr>\n<td><strong>Mid<\/strong><\/td>\n<td>Extracts some characters from a string (starting at any position)<\/td>\n<\/tr>\n<tr>\n<td><strong>Replace<\/strong><\/td>\n<td>Replaces a substring within a string, with another substring, a specified number of times<\/td>\n<\/tr>\n<tr>\n<td><strong>Right<\/strong><\/td>\n<td>Extracts a number of characters from a string (starting from right)<\/td>\n<\/tr>\n<tr>\n<td><strong>RTrim<\/strong><\/td>\n<td>Removes trailing spaces from a string<\/td>\n<\/tr>\n<tr>\n<td><strong>Space<\/strong><\/td>\n<td>Returns a string of the specified number of space characters<\/td>\n<\/tr>\n<tr>\n<td><strong>Split<\/strong><\/td>\n<td>Splits a string into an array of substrings<\/td>\n<\/tr>\n<tr>\n<td><strong>Str<\/strong><\/td>\n<td>Returns a number as string<\/td>\n<\/tr>\n<tr>\n<td><strong>StrComp<\/strong><\/td>\n<td>Compares two strings<\/td>\n<\/tr>\n<tr>\n<td><strong>StrConv<\/strong><\/td>\n<td>Returns a converted string<\/td>\n<\/tr>\n<tr>\n<td><strong>StrReverse<\/strong><\/td>\n<td>Reverses a string and returns the result<\/td>\n<\/tr>\n<tr>\n<td><strong>Trim<\/strong><\/td>\n<td>Removes both leading and trailing spaces from a string<\/td>\n<\/tr>\n<tr>\n<td><strong>UCase<\/strong><\/td>\n<td>Converts a string to upper-case<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<div id=\"midcontentadcontainer\">\n<div id=\"snhb-mid_content-0\"><\/div>\n<\/div>\n<hr \/>\n<h2>MS Access Numeric Functions<\/h2>\n<table class=\"w3-table-all notranslate\">\n<tbody>\n<tr>\n<th><strong>Function<\/strong><\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td><strong>Abs<\/strong><\/td>\n<td>Returns the absolute value of a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Atn<\/strong><\/td>\n<td>Returns the arc tangent of a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Avg<\/strong><\/td>\n<td>Returns the average value of an expression<\/td>\n<\/tr>\n<tr>\n<td><strong>Cos<\/strong><\/td>\n<td>Returns the cosine of an angle<\/td>\n<\/tr>\n<tr>\n<td><strong>Count<\/strong><\/td>\n<td>Returns the number of records returned by a select query<\/td>\n<\/tr>\n<tr>\n<td><strong>Exp<\/strong><\/td>\n<td>Returns e raised to the power of a specified number<\/td>\n<\/tr>\n<tr>\n<td><strong>Fix<\/strong><\/td>\n<td>Returns the integer part of a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Format<\/strong><\/td>\n<td>Formats a numeric value with the specified format<\/td>\n<\/tr>\n<tr>\n<td><strong>Int<\/strong><\/td>\n<td>Returns the integer part of a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Max<\/strong><\/td>\n<td>Returns the maximum value in a set of values<\/td>\n<\/tr>\n<tr>\n<td><strong>Min<\/strong><\/td>\n<td>Returns the minimum value in a set of values<\/td>\n<\/tr>\n<tr>\n<td><strong>Randomize<\/strong><\/td>\n<td>Initializes the random number generator (used by Rnd()) with a seed<\/td>\n<\/tr>\n<tr>\n<td><strong>Rnd<\/strong><\/td>\n<td>Returns a random number<\/td>\n<\/tr>\n<tr>\n<td><strong>Round<\/strong><\/td>\n<td>Rounds a number to a specified number of decimal places<\/td>\n<\/tr>\n<tr>\n<td><strong>Sgn<\/strong><\/td>\n<td>Returns the sign of a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Sqr<\/strong><\/td>\n<td>Returns the square of a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Sum<\/strong><\/td>\n<td>Calculates the sum of a set of values<\/td>\n<\/tr>\n<tr>\n<td><strong>Val<\/strong><\/td>\n<td>Reads a string and returns the numbers found in the string<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>MS Access Date Functions<\/h2>\n<table class=\"w3-table-all notranslate\">\n<tbody>\n<tr>\n<th><strong>Function<\/strong><\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td><strong>Date<\/strong><\/td>\n<td>Returns the current system date<\/td>\n<\/tr>\n<tr>\n<td><strong>DateAdd<\/strong><\/td>\n<td>Adds a time\/date interval to a date and then returns the date<\/td>\n<\/tr>\n<tr>\n<td><strong>DateDiff<\/strong><\/td>\n<td>Returns the difference between two dates<\/td>\n<\/tr>\n<tr>\n<td><strong>DatePart<\/strong><\/td>\n<td>Returns a specified part of a date (as an integer)<\/td>\n<\/tr>\n<tr>\n<td><strong>DateSerial<\/strong><\/td>\n<td>Returns a date from the specified parts (year, month, and day values)<\/td>\n<\/tr>\n<tr>\n<td><strong>DateValue<\/strong><\/td>\n<td>Returns a date based on a string<\/td>\n<\/tr>\n<tr>\n<td><strong>Day<\/strong><\/td>\n<td>Returns the day of the month for a given date<\/td>\n<\/tr>\n<tr>\n<td><strong>Format<\/strong><\/td>\n<td>Formats a date value with the specified format<\/td>\n<\/tr>\n<tr>\n<td><strong>Hour<\/strong><\/td>\n<td>Returns the hour part of a time\/datetime<\/td>\n<\/tr>\n<tr>\n<td><strong>Minute<\/strong><\/td>\n<td>Returns the minute part of a time\/datetime<\/td>\n<\/tr>\n<tr>\n<td><strong>Month<\/strong><\/td>\n<td>Returns the month part of a given date<\/td>\n<\/tr>\n<tr>\n<td><strong>MonthName<\/strong><\/td>\n<td>Returns the name of the month based on a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Now<\/strong><\/td>\n<td>Returns the current date and time based on the computer\\&#8217;s system date and time<\/td>\n<\/tr>\n<tr>\n<td><strong>Second<\/strong><\/td>\n<td>Returns the seconds part of a time\/datetime<\/td>\n<\/tr>\n<tr>\n<td><strong>Time<\/strong><\/td>\n<td>Returns the current system time<\/td>\n<\/tr>\n<tr>\n<td><strong>TimeSerial<\/strong><\/td>\n<td>Returns a time from the specified parts (hour, minute, and second value)<\/td>\n<\/tr>\n<tr>\n<td><strong>TimeValue<\/strong><\/td>\n<td>Returns a time based on a string<\/td>\n<\/tr>\n<tr>\n<td><strong>Weekday<\/strong><\/td>\n<td>Returns the weekday number for a given date<\/td>\n<\/tr>\n<tr>\n<td><strong>WeekdayName<\/strong><\/td>\n<td>Returns the weekday name based on a number<\/td>\n<\/tr>\n<tr>\n<td><strong>Year<\/strong><\/td>\n<td>Returns the year part of a given date<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>MS Access Some Other Functions<\/h2>\n<table class=\"w3-table-all notranslate\">\n<tbody>\n<tr>\n<th><strong>Function<\/strong><\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td><strong>CurrentUser<\/strong><\/td>\n<td>Returns the name of the current database user<\/td>\n<\/tr>\n<tr>\n<td><strong>Environ<\/strong><\/td>\n<td>Returns a string that contains the value of an operating system environment variable<\/td>\n<\/tr>\n<tr>\n<td><strong>IsDate<\/strong><\/td>\n<td>Checks whether an expression can be converted to a date<\/td>\n<\/tr>\n<tr>\n<td><strong>IsNull<\/strong><\/td>\n<td>Checks whether an expression contains Null (no data)<\/td>\n<\/tr>\n<tr>\n<td><strong>IsNumeric<\/strong><\/td>\n<td>Checks whether an expression is a valid number<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>MS Access Functions has many built-in functions. This reference contains the string, numeric, and date functions in MS Access. MS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-sql"],"_links":{"self":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":0,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"wp:attachment":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}