Click or drag to resize

Quarter Function (DateTime, Long)

X#
Returns the quarter of the year in which a date or datetime expression occurs.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION Quarter(
	tExpression AS DateTime,
	 nMonth AS LONG
) AS LONG
Request Example View Source

Parameters

tExpression
Type: DateTime
Specifies the DateTime expression for which you want Quarter( ) to return a value.
nMonth
Type: Long
Specifies an optional starting month to the examined quarter. You can use this to specify quarters based on a fiscal rather than a calendar year.

Return Value

Type: Long
Numeric data type. Quarter( ) returns the quarter of the year in which a date occurs, and the values can be 0, 1, 2, 3, or 4. Quarter( ) returns 0 if passed an empty Date or DateTime value, for example,
1Quarter(NULL_DATE)
See Also