Hour Function | |
Returns the hour portion from a DateTime expression.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION Hour(
tExpression AS DateTime
) AS LONG
public static int Hour(
DateTime tExpression
)
Request Example
View SourceParameters
- tExpression
- Type: DateTime
Specifies a DateTime expression from which Hour( ) returns the hour.
Return Value
Type:
Long
Numeric
Remarks
Hour( ) returns a numeric value based on a 24 hour format, and is not affected by the current setting of SET HOURS. For example, if SET HOURS is 12 or 24, the following command returns 13:
1? Hour({^1998-02-16 1:00p})
Examples 1CLEAR
2? Hour(DateTime( ))
3? Hour({^1998-02-16 10:42a})
See Also