Difference between revisions of "BETWEEN()"
From Lianjapedia
Helen.george (Talk | contribs) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to determine whether a specified expression is between two other specified expressions | Function to determine whether a specified expression is between two other specified expressions | ||
− | |||
==Syntax== | ==Syntax== | ||
BETWEEN(<exp1>,<exp2>,<exp3>) | BETWEEN(<exp1>,<exp2>,<exp3>) | ||
− | |||
==See Also== | ==See Also== | ||
[[CHROVERLAP()]], [[EMPTY()]], [[EVALUATE()]], [[EXPRCHECK()]], [[INLIST()]], [[INRANGE()]], [[ISALPHA()]], [[ISBLANK()]], [[ISDIGIT()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[TYPE()]], [[VARTYPE()]] | [[CHROVERLAP()]], [[EMPTY()]], [[EVALUATE()]], [[EXPRCHECK()]], [[INLIST()]], [[INRANGE()]], [[ISALPHA()]], [[ISBLANK()]], [[ISDIGIT()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[TYPE()]], [[VARTYPE()]] | ||
− | |||
==Description== | ==Description== | ||
The BETWEEN() function returns true (.T.) if the value of a specified expression lies in the range delimited by two other expressions all of the same data type. The BETWEEN() function operates on Character, Date and Numeric expressions. | The BETWEEN() function returns true (.T.) if the value of a specified expression lies in the range delimited by two other expressions all of the same data type. The BETWEEN() function operates on Character, Date and Numeric expressions. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | !width="30%"|Parameters||Description |
− | !Parameters||Description | + | |
|- | |- | ||
|<exp1>||The expression to be checked. | |<exp1>||The expression to be checked. | ||
Line 25: | Line 21: | ||
|- | |- | ||
|} | |} | ||
− | |||
The <exp1> must be equal to or more than <exp2> and equal to or less than <exp3> for BETWEEN() to return true (.T). If <exp1> is not within this range, BETWEEN() returns false (.F.). | The <exp1> must be equal to or more than <exp2> and equal to or less than <exp3> for BETWEEN() to return true (.T). If <exp1> is not within this range, BETWEEN() returns false (.F.). | ||
− | |||
==Example== | ==Example== | ||
Line 40: | Line 34: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Category: | + | [[Category:Formatting Functions]] |
− | + |
Latest revision as of 07:53, 4 February 2013
Contents
Purpose
Function to determine whether a specified expression is between two other specified expressions
Syntax
BETWEEN(<exp1>,<exp2>,<exp3>)
See Also
CHROVERLAP(), EMPTY(), EVALUATE(), EXPRCHECK(), INLIST(), INRANGE(), ISALPHA(), ISBLANK(), ISDIGIT(), MAX(), MAXVALUES(), MIN(), MINVALUES(), TYPE(), VARTYPE()
Description
The BETWEEN() function returns true (.T.) if the value of a specified expression lies in the range delimited by two other expressions all of the same data type. The BETWEEN() function operates on Character, Date and Numeric expressions.
Parameters | Description |
---|---|
<exp1> | The expression to be checked. |
<exp2> | Expression representing the range minimum. |
<exp3> | Expression representing the range maximum. |
The <exp1> must be equal to or more than <exp2> and equal to or less than <exp3> for BETWEEN() to return true (.T). If <exp1> is not within this range, BETWEEN() returns false (.F.).
Example
? between(date(),date()-10,date()+10) .T. ? between("A", "A", "Z") .T. ? between(10,1,9) .F.