### Month (x)

Basic and Crystal syntax.

##### Arguments

x is a Date value or a dateTime value.

##### Returns

Whole Number

##### Action

Month extracts the month component of a date and converts it to a Number.

##### Typical uses

Use any time you need only the month component of a date. For example, if you are tracking payments that fall within a given year, you are interested only in the month they arrive; day and year information would be redundant. Also, if you need to use the number of the month in a numeric calculation (Month({file.OCTPMT}) - Month({file.SEPPMT}), for example) use the Month function to extract the month component of the date and convert it to a Number.

##### Examples

The following examples are applicable to Crystal syntax:

`Month({file.INVOICE}) - Month({file.PAYMENT})`

Calculates the number of months between the Invoice and the Payment.

If Month({file.LAST PURCHASE}) < 6 Then
"You will see some changes since you last shopped our store."
Else
"As you have certainly noticed, we have been making many changes in our store recently.";

Prints "You will see some changes since you last shopped our store." for those customers whose last purchase was in May or earlier, and prints "As you have certainly noticed, we have been making many changes in our store recently." for customers who have purchased more recently than May.

##### Comments

This function is designed to work like the Visual Basic function of the same name.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com