Quarter Function (DateTime, Long) | |
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.21
Syntax FUNCTION Quarter(
tExpression AS DateTime,
nMonth AS LONG
) AS LONG
public static int Quarter(
DateTime tExpression,
[DefaultParameterValueAttribute(1, 0)] int nMonth
)
Request Example
View SourceParameters
- 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,
See Also