DCount Function

Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. You can use the DCount function to determine the number of records that are in a specified set of records (a domain). Use the DCount function in a Visual Basic for Applications (VBA) module, a macro, a query expression, or a calculated control. For example, you could use the DCount function inContinue reading “DCount Function”

Weekday Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Integer) containing a whole number representing the day of the week. Syntax Weekday( date [, firstdayofweek ] ) The Weekday function syntax has these arguments: Argument Description date Required. Variant, numeric expression, string expression, or any combination of these that can represent a date. If date contains Null, Null is returned. firstdayofweek Optional. AContinue reading “Weekday Function”

Now Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date) specifying the current date and time according your computer’s system date and time. Syntax Now Query examples Expression Results SELECT Now() AS Expr1 FROM ProductSales GROUP BY Now(); Returns the current system “Date and Time” in the default system Time format andContinue reading “Now Function”

Month Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Integer) specifying a whole number between 1 and 12, inclusive, representing the month of the year. Syntax Month( date ) The required dateargument is any Variant, numeric expression, string expression, or any combination of these that can represent a date. If date contains Null, Null is returned. Note: If the Calendar property settingContinue reading “Month Function”

DateValue Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date). Syntax DateValue ( date ) The required dateargument is normally a string expression representing a date from January 1, 100 through December 31, 9999. However, date can also be any expression that can represent a date, a time, or both a date and time, in that range. RemarksContinue reading “DateValue Function”

DateSerial Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date) for a specified year, month, and day. Syntax DateSerial ( year, month, day ) Warning  –  Make sure the arguments are in the correct range of values. An invalid argument can result in an incorrect result. The DateSerial function syntax has these arguments: Argument Description year Required. Integer. NumberContinue reading “DateSerial Function”

DatePart Function

Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Integer) containing the specified part of a given date. Warning   – There is an issue with the use of this function. The last Monday in some calendar years can be returned as week 53 when it should be week 1. For more information and a workaround,Continue reading “DatePart Function”

DateDiff Function

Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Long) specifying the number of time intervals between two specified dates. Syntax DateDiff ( interval, date1, date2 [, firstdayofweek] [, firstweekofyear] ) The DateDiff function syntax has these arguments: Tip: In Access 2010, the Expression Builder has IntelliSense, so you can see what arguments your expression requires.  Argument Description interval Required. String expression thatContinue reading “DateDiff Function”

DateAdd Function

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (Date) containing a date to which a specified time interval has been added. Syntax DateAdd ( interval, number, date ) The DateAdd function syntax has these arguments: Argument Description interval Required. String expression that is the interval of time you want to add. number Required. Numeric expression thatContinue reading “DateAdd Function”

LTrim, RTrim, and Trim Functions

Applies to: Access for Microsoft 365, Access 2019, Access 2016, Access 2013, Access 2010, Access 2007. Returns a Variant (String) containing a copy of a specified string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim). Syntax LTrim ( string ) RTrim ( string ) Trim( string ) The required stringargument is any valid string expression. If string contains Null, Null is returned. Query examples Expression Results SELECT LTrim(ProductDesc) ASContinue reading “LTrim, RTrim, and Trim Functions”