hour

 

 

Overview

The hourfunction returns the hour of a Date or Time argument. The value of the hour is calculated on the basis of a 24 hour clock and ranges from 0 (12:00 AM) to 23 (11:00 PM).

Usage

The hour function is used to extract the hour component from a Date/Time object.

 

Syntax


Expression:

(hour date-value )

(hour time-text )

(hour Julian-date )


Arguments Name Type Description
Argument:date-valueDate An Analytic Information Server Date value
Argument:time-textString Text A time string in the form "hh:mm:ss AM/PM" where hh is the number of hours (0-24), mm in the number of minutes (0-60), ss is the optional number of seconds (0-60) and AM/PM optionally specifies morning or afternoon. If you use 12 hour time, you must include AM or PM; if you use 24 hour time, do not include AM or PM.
Argument:Julian-dateDate A Julian date with a fraction extension representing the time for that date. The first two digits after the decimal point in the serial number correspond to a fraction of a 24 hour day. For example 0.00 corresponds to 12:00 AM; 0.25 corresponds to 6:00 AM; 0.50 corresponds to 12:00 Noon and so on.

Returns:

An Integer that represents the hour component of the argument



 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

Here are the links to the data types of the function arguments.

Number Date String Text
Integer

Here are also a number of links to functions having arguments with any of these data types.

++ += + /=
/ *= * --
-= - abs acos
add1 addMethod addi appendWriteln
append argument arithmetic asin
atan avg badd balance
bdiv binaryInsert binaryNand binaryNor
binaryNot binaryNxor binarySearch bitwiseAnd
bitwiseNand bitwiseNor bitwiseNot bitwiseNxor
bitwiseOr bitwiseShiftLeft bitwiseShiftRight bitwiseXor
bmod bmul boolean cadd
cdiv char character clean
closeLog cmod cmul code
compareEQ compareGE compareGT compareLE
compareLT compareNE compare comparison
compress cons cos cosh
count csub date day
days360 debugBrowsableProcs debugDetective debugEval
decode deg deleteRows delete
dimension disassemble display divi
downcase encode evalInSyncLocalContext eval
exit exp exportCsv exportSbf
exportTab expt fact fdisplay
fileClose fileCopy fileDir fileDisplay
fileEraseDir fileErase fileExists fileMakeDir
fileOpen fileReadAll fileReadRecord fileRead
fileResize fileSeek fileSizeOf fileWriteAll
fileWrite filewriteln findBlock find
floor fraction freeBlock gcd
getRecursionCount getTickCount hashString hour
iadd icompareEQ icompareGE icompareGT
icompareLE icompareLT icompareNE idiv
imod importCsv importSbf importTab
imul insertRows insert inside
inspect integer isAtom isBitVector
isBoolean isBound isByteVector isCharAlphabetic
isCharAlphanumeric isCharLowercase isCharName isCharNumeric
isCharUppercase isCharWhitespace isChar isCharacter
isComplex isDate isDictionary isDirectory
isEqual isError isEven isExact
isFloatVector isIdentical isInexact isInside
isIntegerVector isInteger isLambda isMatrix
isMember isMoney isNegative isNull
isNumberMatrix isNumberVector isNumber isObjectVector
isObject isOdd isPair isPcodeVector
isPositive isString isStructure isSymbol
isText isType isVector isZero
isub julian kurtosis lcm
left length list loadModule
loadWorkspace log10 log2 log
logbase macroReplace makeQuotedList makeQuotedSymbol
max median member mid
min minute mod modi
money month muli nadd
ncompareEQ ncompareGE ncompareGT ncompareLE
ncompareLT ncompareNE ndiv new
nmod nmul now nsub
number objectToMatrix objectToNumMatrix objectToNumVector
offset openLog pair parent
parse pi pointer preAllocateFixedMemoryBlocks
product qt rad random
randomize range rank refAttributes
refValues ref remove replace
rept resize right round
run saveImmediate saveModule saveObject
saveRepository saveWorkspace second setAttributes
setBlock setCar setCdr setLastCdr
set setf setq sigmoid
sign sin sinh sizeof
skew sleep sort sql
sqrt srandom stdev stdevp
stringCiEQ stringCiGE stringCiGT stringCiLE
stringCiLT stringCiNE stringFill stringToBVector
stringToVector string sub1 subi
submit substitute substringCiEQ substringCiGE
substringCiGT substringCiLE substringCiLT substringCiNE
substringEQ substringFill substringGE substringGT
substringLE substringLT substringNE substring
sum sumsqr svmRegression symbolToTypeCode
symbol system tan tanh
text time today trim
type uniqueInsert upcase var
varp vectorBinaryInnerProduct vectorBipolarInnerProduct vectorCosineInnerProduct
vectorCubeInnerProduct vectorDelete vectorExpInnerProduct vectorFill
vectorInnerProduct vectorLogInnerProduct vectorQuartInnerProduct vectorQuintInnerProduct
vectorSigmoidInnerProduct vectorSineInnerProduct vectorSquareInnerProduct vectorTanInnerProduct
vectorTanhInnerProduct writelg writeln year

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE