[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
MONTH()
Convert a date value to the number of the month
------------------------------------------------------------------------------
Syntax
MONTH(<dDate>) --> nMonth
Arguments
<dDate> is the date value to be converted.
Returns
MONTH() returns an integer numeric value in the range of zero to 12.
Specifying a null date (CTOD("")) returns zero.
Description
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.
Examples
. These examples return the month of the system date:
? DATE() // Result: 09/01/90
? MONTH(DATE()) // Result: 9
? MONTH(DATE()) + 1 // Result: 10
. This example demonstrates MONTH() acting on a null date:
#define NULL_DATE (CTOD(""))
? MONTH(NULL_DATE) // Result: 0
Files Library is CLIPPER.LIB.
See Also:
CMONTH()
DAY()
DOW()
YEAR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson