This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help

Next Topic

Book Contents

Book Index

Date Functions

A Date Function is used to extract parts of a date for use in other expressions or for analysis or reporting. To use a date function with a date variable, follow the variable name with the function name.

For example, to determine the day of the week represented by the response to variable BIRTHDATE, use:

BIRTHDATE WEEKDAY

At least one space must be left between the function name and variable name.

Table of logical functions for use with logical expressions

Function

Description

WEEKDAY

Gives a number representing the day of the week (1=Monday, …, 7=Sunday).

WEEKDAY NAME

Gives a Literal value representing the day of the week "Monday" to "Sunday". The first character will be upper-case. You can truncate the name to three characters.

DAY

Gives a number representing the day of the month (1 to 31).

MONTH

Gives a number representing the month of the year (1=January, …, 12=December).

MONTH NAME

Gives a Literal value representing the month of the year "January" to "December". The first character will be upper-case. You can truncate the name to three characters.

YEAR

Gives a number representing the four-digit year of a date.

See Also

Date Operators