Allan Bach

Software Training, Support, & PC Repair

Click with Confidence


This is just a sampling of functions with
 only a few parameters shown.
Search Access on-line help
for more detailed information

Date and Time Functions

Function

Description

Example

Returns

Date

Returns the current system date and time

Date

10/22/00

DateDiff

Returns an integer representing the difference between two dates

DateDiff("d", Date, Now)

Number of days between Now and Date

DatePart

Returns the specified part of a date, such as day, month, year, day of week, as an Integer

DatePart("w",Date)

Integer corresponding to day of week, 1=Saturday, 2=Sunday, etc., where Date is a valid Date

MonthName

Returns the full or abbreviated name of a month. Value is a month number ( 1 to 12 ).

MonthName(Number,False)

MonthName(Number,True)

September (if 9)

Sept. (if 9)

Now

Returns date and time of system clock

Now

10/12/00 6:15:33 PM

Weekday

Returns day of week as Integer (Sunday=1)

Weekday(Date)

7 if Date is Saturday

Text Functions

Function

Description

Example

Returns

Format

Formats an expression

Format(Date, "Long Date")

Monday, July 10, 2000

Left

Returns leftmost characters of a string

Left("Hello",2)

He

Len

Returns number of characters in a string

Len("Hello")

5

Mid

Returns a portion of a string

Mid("Hello",2,3)

ell

Right

Returns rightmost characters of a string

Right("Hello",3)

llo

Trim

Removes leading and trailing spaces from a string

Trim(" Hello ")

Hello