### Day (x)

Basic and Crystal syntax.

##### Arguments

x is a Date value or a DateTime value.

##### Returns

Whole Number (the day of the month)

##### Action

Day extracts the day from a Date or DateTime value and returns a whole number.

##### Typical uses

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

##### Examples

The following examples are applicable to Crystal syntax:

`Day({file.LAST INVOICE})`

Returns 10 where the last invoice date was the 10th day of the month.

If Day({file.LAST PAYMENT}) < 15 Then
"Past Due"
Else
""

If the day of the last payment was less than 15, print "Past Due", otherwise print nothing.

`Day(CDateTime(1996, 3, 3, 10, 33, 20))`

Returns 3.

##### 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