You are here: Function Reference > Date Functions

Date Functions

Date functions perform specific operations regarding date information. These functions enter or alter a date in a particular manner. The date functions are summarized in the table below. Click on the function name to jump to a discussion of that function.

Function

 

Date

Returns a date string or the current date.

Date2Date

Converts one date format to a new format and returns the result.

DateAdd

Adds days, months, and years to the date and returns the result.

DateCnv

Converts a date specified with a two-digit year into a date containing a four-digit year value.

Day

Returns the day of the month number from a date and returns the result.

DayName

Returns the specified day name.

DaysInMonth

Returns the number of days in the specified month and year.

DaysInYear

Returns the number of days in the specified year.

DiffDate

Calculates the difference between two dates and returns a positive or negative value based on which date is earlier.

DiffDays

Returns the difference in days between two dates.

DiffMonths

Returns the difference in months between two dates.

DiffYears

Returns the difference in years between two dates.

LeapYear

Returns one (1) if the specified year is a leap year and zero (0) if it is not a leap year.

Month

Returns the month number from a date.

MonthName

Returns the specified month name.

WeekDay

Returns the week day number from a date.

Year

Returns the year from a date.

YearDay

Returns the number of the day of the year from a date.

Before we examine each date function individually you must understand the available date formats. Date formats are usually one of the parameters you enter for a date function. The date format determines how your date information appears when it is returned to the section assigned to a target variable.

See Also