xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Month()

Extracts the numeric month number from a Date value.

Syntax

Month( <dDate> ) --> nMonth

Arguments

<dDate>
This is an expression returning a value of data type Date.

Return

The function returns the numeric month number of <dDate>. When <dDate> is an empty date, the function returns zero.

Description

This function is used to extract the numeric month from a Date value.

Info

See also:CMonth(), Day(), DoW(), Hour(), Minute(), Secs(), Year()
Category: Conversion functions , Date and time
Source:rtl\dateshb.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows results of the function Month()

   PROCEDURE Main

      ? Date()                         // result: 02/25/06
      ? Month( Date() )                // result: 2
      ? Month( Date() + 7 )            // result: 3

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe