Month()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

Month()

Syntax

Month( <DateValue> )

 

Purpose

To determine the Month of the year for a given date value.

 

Parameters

<DateValue> may be the name of a date field (such as the .Donation_Date. field), but it may also be any value of Date type -- such as the current date returned by the "Date()" function.

 

Returns

Month() returns a number in the range of 0 to 12 as an integer numeric value. If the date parameter is empty (" / / "), Month() returns zero.

 

Usage

Month() is a date conversion function that is useful when you require a numeric month value during calculations for such things as periodic reports. Month() is a member of a group of functions that return components of a date value as numeric values. The group includes Day() and Year() to return the day and year values as numerics. CMonth() is a related function that allows you to return the name of the month from a date value.

 

Example

The following examples show the Month() function used in several; ways:

 

These examples illustrate returning the month of the system date:

 

CALL

RESULT

Date()

09/01/16

Month( Date() )

9

Month( Date() ) + 1

10