1. Accueil
  2. Guide du concepteur
  3. Introduction au langage de formules

Introduction au langage de formules

WEHOOP utilise le langage de formules qui permet d’effectuer des opérations, des calculs et des comparaisons dans une forme qui demeure simple. Le langage de formules est très similaire au langage utilisé par Microsoft Excel.

Voir aussi le langage @hoop.

Le langage de formules est composé de fonctions et d’opérateurs. On retrouve trois (3) grandes catégories de fonctions: arithmétiques, texte et dates et heures.

Travailler avec les opérateurs

Les opérateurs sont utilisés pour comparer ou assimiler des valeurs et pour des calculs mathématiques. Le tableau suivant répertorie les principaux opérateurs utilisés dans les formules.

OPÉRATEURS DESCRIPTION
Utilisé en soustraction ou pour représenter un nombre négatif
+ Utilisé en addition ou pour représenter un nombre positif
* Utilisé pour la multiplication
/ Utilisé pour la division
!= Représente est différent de
& Représente un ET logique
| Représente un OU logique
: Utilisé pour séparer une liste de valeurs
:= Utilisé pour attribuer une valeur à une variable
< Représente est inférieur à
<= Représente est inférieur ou égale à
= Représente est égale à
> Représente est supérieur à
>= Représente est supérieur ou égale à

Évaluer une condition

Cette fonction, toute simple, est d’une grande utilité pour WEHOOP. Elle offre le possibilité de comparer des valeurs et d’effectuer des opérations selon certaines conditions.

Elle est principalement utilisée pour indiquer dans quels cas un champ est obligatoire ou dans le cas d’une transition conditionnelle au niveau du workflow.
Utilisation

  • Sujet du formulaire
  • Obligatoire selon condition
  • Masquer selon condition
  • Valeur initiale
  • Valeur minimale
  • Valeur maximale
  • Formule de validation

@If

Evaluates a condition; if the condition is True, WEHOOP performs the action appearing immediately after that condition, and stops. If the condition is False, WEHOOP skips to the next condition and tests it, and so on. If none of the conditions is True, WEHOOP performs the else_action.
Syntaxe
@If( condition1 ; action1 ; condition2 ; action2 ; … ; condition99 ; action99 ; else_action )
Paramètres
condition
Expression that returns a Boolean. If this expression returns True, action is performed. If it’s False, WEHOOP skips to the next condition, if there is one. Otherwise, WEHOOP performs else_action.
action
An action to be performed or a value to be returned if the governing condition returns True.
else_action
An action to be performed or a value to be returned if none of the conditions returns True.
Usage
In its simplest form, the If statement looks like this: @If( condition ; action ; else_action ).
You can list up to 99 conditions and corresponding actions, followed by just one action to be performed when all the conditions are False. As soon as a condition evaluates to True, WEHOOP performs the associated action and ignores the remainder of the @If statement.
WEHOOP accepts the form @If( condition ), with only one condition and no action, but does not perform any action based on the condition.

If you compare a field to a value (for example, Year > 1995) and the field is unavailable, the comparison is False. However, you should check for fields that may not be present with @IsUnavailable.
Exemples
This formula tests the single value in the CostOfGoods field. If the value is greater than or equal to 12.45, the condition is True, and the string "Over Budget" is returned. If the value is less than 12.45, the condition is False and the string "Bill of Materials OK" is returned.
@If(CostOfGoods>=12.45;"Over Budget";"Bill of Materials OK")

In this example, if CostOfGoods is less than 12.45, the null string is returned.
@If(CostOfGoods>=12.45;"Over Budget";"")

Effectuer des opérations arithmétiques

Les opérateurs * / + multiplient, divisent, ajoutent et soustraient. La multiplication et la division ont priorité sur l’addition et la soustraction; sinon, l’évaluation est de gauche à droite. Les parenthèses peuvent être utilisées pour modifier l’ordre d’évaluation.

@IsNumber

Indique si une valeur donnée est un nombre (ou une liste de nombres).
Syntaxe
@IsNumber( valeur )
Paramètres
valeur : Any data type. Any value.
Valeur retournée
Returns 1 (True) if the value is a number or a number list
Returns 0 (False) if the value is not a number or a number list
Usage
This is a useful function for checking to see that you have assigned field data types correctly.
The parameter must be a number, not a non-numeric value (for example, text) that can be converted to a number.
Exemples
Cet exemple retourne 1.
@IsNumber(123)

Cet exemple retourne 0.
@IsNumber("123")

@Modulo

Returns the remainder of a division operation.
Syntaxe
@Modulo( number1 ; number2 )
Paramètres
number1
Number or number list.
number2
Number or number list. If this is equal to 0, @Modulo returns @ERROR.
Valeur retournée
remainder
Number or number list. The remainder of number1 divided by number2. If the parameters are number lists, @Modulo returns a list that is the result of pair-wise computation on the list values. The sign of the result is always the same as the sign of the number1.
Usage
A common use of @Modulo is to determine whether a number is odd or even; if the result of @Modulo(number;2) is 1, the number is odd; if the result is 0, the number is even.
When using this function with a number list, the list concatenation operator takes precedence over any other operators; negative numbers must be enclosed in parentheses.
Exemples
Cet exemple retourne 1.
@Modulo(4;3)

Cet exemple retourne 0.
@Modulo(4;2)

@Text

Converts any value to a text string.
Syntaxe
@Text( value ; format-string )
Paramètres
value
Number, time-date, text, list thereof, or rich text. The value you want to convert to text.

format-string
Text or text list. Optional. Up to four format-strings (see table that follows). These determine how the text is returned. If the value is already a text data type, the format-string is ignored.
Valeur retournée
textValue
Text or text list. The value you specified, converted to text. If you used any format-strings, they are applied.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

Once a number value is converted to text, you will not be able to use the number for arithmetic calculations.
Exemples
Cet exemple retourne 123.45.
@Text(123.45)

@Sum

Adds a set of numbers or number lists.
Syntaxe
@Sum( numbers )
Paramètres
numbers
Numbers or number lists. As many numbers or number lists as you want to sum.
Valeur retournée
result
Number. The sum of all the numbers, including members of number lists.
Usage
Make sure the fields you send as parameters contain a number value — WEHOOP interprets empty number fields as the null string.
Since list concatenation has the highest precedence, list elements that are expressions must be in parentheses if the expression applies only to that element. For example, write @Sum(1:2:(-3):4), not @Sum(1:2:-3:4), if 3 is negative and 4 is not.
Exemples
Cet exemple retourne 3.
@Sum( 1 : 2 )

Cet exemple retourne 11.
@Sum( (-1) : 2 ; (-10) : 20 )

@TextToNumber

Converts a text string to a number, where possible.
Syntaxe
@TextToNumber( string )
Paramètres
string
Text or text list. The string you want to convert to a number. If the string contains both numbers and letters, it must begin with a number to be converted properly. For example, the string "12ABC" converts to 12, but "ABC12" produces an error.
Valeur retournée
number
Number or number list. The string, converted to a number.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
This function is useful for converting a number in a text field to a number that can be used for computation in a number field.

You can’t use @TextToNumber to convert special text (such as that returned by @DocChildren or @DocDescendants) to a number.
@TextToNumber returns an error If you try to pass anything besides a string into it.
Exemples
Cet exemple retourne 123 as a number.
@TextToNumber("123")

Cet exemple retourne 123 and 456 as a number list.
@TextToNumber("123" : "456")

Effectuer des opérations sur du texte

Les opérations sur le texte permettent de:
– Concaténer, comparer et déterminer la longueur d’un texte.
– Localiser et extraire des sous-chaînes
– Ajuster, répétition, ajoutez une nouvelle ligne, et changer la casse

@Contains

Determines whether a substring is stored within a string.
Syntaxe
@Contains( string ; substring )
Paramètres
string
Text or text list. The string(s) you want to search.
substring
Text or text list. The string(s) you want to search for in string.
Valeur retournée
Returns true (1) if any substring is contained in one of the strings
Returns false (0) if no substrings are contained in any of the strings
Usage
This function is case-sensitive.
If either parameter is a list, the function returns 1 if any element of parameter 1 contains any element of parameter 2.

You cannot use this function to test for substrings in a rich text field.
Avoid using this function to test for an exact match (that is, parameter 2 equals parameter 1). The result will be wrong if parameter 1 is not an exact match but does contain parameter 2. Use the equal operator or @IsMember, which will give the desired result and are more efficient.
Exemples
Cet exemple retourne 1 to indicate that the substring, "Th," is contained in the string, "Hi There."
@Contains("Hi There";"Th")

Cet exemple retourne 1 to indicate that the items in one text list are contained in the other text list.
@Contains("Tom":"Dick":"Harry";"Harry":"Tom")

@Elements

Calculates the number of text, number, or time-date values in a list. This function always returns a number to indicate the number of entries in the list.
Syntaxe
@Elements( list )

Paramètres
list
Text list, number list, or time-date list.
Valeur retournée
numElements
Number. The number of elements in the list. If the field value is a null string, @Elements(list) returns the number 0. @Count returns 1 if the field value is a null string or not a list value.
Usage
You can use @Elements in the condition statement of @For functions to set the loop count equal to the number of elements in the list:
@For(n := 1; n <= @Elements(list); n := n + 1;formula)
Exemples
Cet exemple retourne 4 if the list in the SalesForce field is "Rogers":"Binney":"Harris":"Larson."
@Elements(SalesForce)

Cet exemple retourne 2.
@Elements("Jones":"Portsmore")

@IsMember

Indicates if a piece of text (or a text list) is contained within another text list. The function is case-sensitive.
Syntaxe
@IsMember( textValue ; textListValue ) @IsMember( textListValue1 ; textListValue2 )
Paramètres
textValue
Text.
textListValue
Text list.
textListValue1
Text list.
textListValue2
Text list.
Valeur retournée
Returns 1 (True) if the textValue is contained in textListValue
Returns 0 (False) if not
If both parameters are lists, returns 1 if all elements of textListValue1 are contained in textListValue2
Usage
In processing lists, @IsMember differs from a simple = test. An = returns True if the pair-wise comparison of two entities has even one member; that is, it is not empty.
For further details on pair-wise operators, see the topic Operations on lists.
@IsMember returns True only if the first parameter is an exact match, or a subset of the second parameter which is a list.
Exemples
Cet exemple retourne 1.
@IsMember("computer";"printer":"computer":"monitor")

Cet exemple retourne 0.
@IsMember("computer":"Notes";"Notes":"printer":"monitor")

@Left

Searches a string from left to right and returns the leftmost characters of the string.
Syntaxe
@Left( stringToSearch ; numberOfChars ) @Left( stringToSearch ; subString )
Paramètres
stringToSearch
Text or text list. The string where you want to find the leftmost characters.
numberOfChars
Number. The number of characters to return. If the number is 2, the first two characters of the string are returned; if the number is 5, the first five characters are returned, and so on. If the number is negative, the entire string is returned.
subString
Text. A substring of stringToSearch. @Left returns the characters to the left of subString. It finds subString by searching stringToSearch from left to right.
Valeur retournée
resultString
Text or text list. The leftmost characters in stringToSearch. The number of characters returned is determined by either numberOfChars or subString. @Left returns "" if subString is not found in stringToSearch.
Usage
If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
Cet exemple retourne Len.
@Left("Lennard Wallace";3)

Cet exemple retourne Lennard Wal if the string in the Contact field is Lennard Wallace.
@Left(Contact;"la")

@LowerCase

@LowerCase (Formula Language)
Converts the uppercase letters in the specified string to lowercase.
Syntaxe
@LowerCase( string )
Paramètres
string
Text or text list. The string you want to convert to lowercase.
Valeur retournée
lowerCaseString
Text or text list. The string, converted to lowercase letters.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

This function is useful when you want to search for a particular value and cannot predict whether it appears in lowercase or uppercase letters, or a combination of the two. You can also use it as an input translation formula to convert the contents of a field to lowercase.
Exemples
Cet exemple retourne juan mendoza.
@LowerCase("Juan Mendoza")

Cet exemple retourne arm chair if the Furniture field contains "Arm Chair," "Arm chair," "arm chair," or "ARM CHAIR," or any other variation.
@LowerCase(Furniture)

@Middle

Returns any substring from the middle of a string. The middle is found by scanning the string from left to right, and parameters determine where the middle begins and ends.
Syntaxe
@Middle( string ; offset ; numberchars ) @Middle( string ; offset ; endstring ) @Middle( string ; startString ; endstring ) @Middle( string ; startString ; numberchars )
Paramètres
string
Text or text list. Any string.
offset
Number. A character position in string that indicates where you want the middle to begin, always counting from left to right. The middle begins one character after the offset.
startString
Text. A substring of string that indicates where you want the middle to begin, always counting from left to right. The middle begins one character after the end of startString.
numberchars
Number. The number of characters that you want in the middle. If numberchars is negative, the middle starts at offset or startString and continues from right to left. If numberchars is positive, the middle starts one character past the offset or startString and continues from left to right.
endstring
Text. A substring of string that indicates the end of the middle. @Middle returns all the characters between offset and endstring, or between startString and endstring.
Valeur retournée
middle
Text or text list. The substring from the middle of string, which begins at the offset or startString you specify and ends at the endstring you specify, or after the numberchars have been reached.
Usage
If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
Cet exemple retourne h C. The offset is positioned at the "t" (the fourth character from the left), and the count starts with the first character after the offset, moving from left to right.
@Middle("North Carolina";4;3)

Cet exemple retourne ort. The offset is positioned at the "t" (the fourth character from the left), and the count begins at the offset, moving from right to left.
@Middle("North Carolina";4;-3)

@Name

Returns the rightmost characters in the string. You can specify the number of rightmost characters you want returned, or you can indicate that you want all the characters following a specific substring.
Syntaxe
@Right( stringToSearch ; numberOfChars ) or @Right( stringToSearch ; subString )
Paramètres
stringToSearch
Text or text list. The string whose rightmost characters you want to find.
numberOfChars
Number. The number of characters to return. If the number is 2, the last two characters of stringToSearch are returned; if the number is 5, the last five characters are returned, and so on.
subString
Text. A substring of stringToSearch. @Right returns all of the characters to the right of subString. It finds subString by searching stringToSearch from left to right.
Valeur retournée
resultString
Text or text list. The rightmost characters in stringToSearch. The number of characters returned is determined by either numberOfChars or subString. @Right returns "" if subString is not found in stringToSearch.
Usage
If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
Cet exemple retourne "ace," the rightmost 3 characters in the string.
@Right("Lennard Wallace";3)

Cet exemple retourne "Wallace," which represents everything to the right of the first occurrence of the blank space.
@Right("Lennard Wallace";" ")

@Sort

Sorts a list.
Syntaxe
@Sort( list ; [ order ])
Paramètres
list
Text, number, or time-date list. The values to be sorted. Any alternate data types are returned unchanged.
[ order ]
Keyword. Optional. You can use the following keywords to specify the order of the sort:
[ASCENDING]
[DESCENDING]
Valeur retournée
list
Text, number, or time-date list. The sorted values.
Usage
The ascending, case-, and accent-sensitive sort sequence for the English character set is as follows: the numbers 0-9, the alphabetic characters aA-zZ, the apostrophe, the dash, and the remaining special characters. Pitch-sensitivity affects double-byte languages.
Exemples
This formula returns: Albany, New Boston, new york, San Francisco.
@Sort(@ThisValue)
Same as preceding.
@Sort(@ThisValue; [ASCENDING])

This formula returns: San Francisco, New Boston, new york, and Albany.
@Sort(@ThisValue; [DESCENDING])

@Subset

Searches a list from beginning to end and returns the number values you specify. If you specify a negative number, @Subset searches the list from beginning to end, but the result is ordered as from the beginning of the list.
Syntaxe
@Subset( list ; number )
Paramètres
list
Text list, number list, time-date list, or time-date range list. The list whose subset you want.
number
Number. The number of values from list that you want. Specifying zero (0) returns the error, "The second argument to @Subset must not be zero."
Valeur retournée
subsetList
Text list, number list, or time-date list.The list, containing the number of values you specified.
Exemples
Cet exemple retourne New Orleans;London.
@Subset("New Orleans":"London":"Frankfurt":"Tokyo";2)

Cet exemple retourne London;Frankfurt;Tokyo.
@Subset("New Orleans":"London":"Frankfurt":"Tokyo";-3)

Effectuer des opérations sur des date-heure

Une valeur de date-heure consiste en une année, un mois, un jour, une heure, une minute et une seconde. Vous pouvez utiliser une valeur de date de l’heure "telle quelle" dans un champ de date de l’heure, mais doit la convertir avec @Text pour l’utiliser comme chaîne. Vous pouvez convertir une chaîne en une date-heure avec @TextToTime.

@Adjust

Adjusts the specified time-date value by the number of years, months, days, hours, minutes, and/or seconds you specify. The amount of adjustment may be positive or negative.
Syntaxe
@Adjust( dateToAdjust ; years ; months ; days ; hours ; minutes ; seconds ; [DST] )
Parameters
dateToAdjust
Time-date or time-date list. The time-date value you want to increment. This should be a single date, not a range.
years
Number. The number of years to increment by.
months
Number. The number of months to increment by.
days
Number. The number of days to increment by.
hours
Number. The number of hours to increment by.
minutes
Number. The number of minutes to increment by.
seconds
Number. The number of seconds to increment by.
[DST]
Keyword. Optional. Specify [INLOCALTIME] to further adjust the time for daylight-saving time if the adjustment crosses the boundary and daylight-saving time is in effect. Specify [INGMT] or omit this parameter to not further adjust the time for daylight-saving time. The adjustment is such that adding or subtracting in day increments yields the same time in the new day.
Valeur retournée
adjustedDate
Time-date. The date, incremented by the amount of time you have specified.
Usage
If the first parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
You must include all arguments except the [DST] keyword; include a zero (0) for parameters you don’t want to adjust.
The arguments are applied from right to left. For instance, @Adjust([2/2/2006]; 0; 2; 28; 0; 0; 0) returns [5/2/2006], not [4/30/2006] as you might expect. This is because @Adjust first adds 28 days, making [3/2/2006], then adds two months, making [5/2/2006]. To first add two months, then add 28 days, use @Adjust twice, for instance: @Adjust(@Adjust([02/02/2006]; 0; 2; 0; 0; 0; 0); 0; 0; 28; 0; 0; 0)
Tip
To find the difference between two dates, subtract them. The result is returned in seconds. To adjust the result to days, divide the result by 86,400 – which is the number of seconds in a day.

For example: (date2-date1)/86400
This code returns 4.
Calculating due dates
A typical use for @Adjust is calculating a due date from an entry date, by adjusting only one component of the time-date value, for example, the month component.
Exemples
This example returns 03/20/94. A date that is 2 years and 10 days before the supplied date.
@Adjust([03/30/96];-2;0;-10;0;0;0)

This example returns 09/1/97 and 09/2/97.
@Adjust([06/29/95] : [06/30/95]; 2; 2; 2; 0; 0; 0)

This example returns the date one month from the date in the field named Date.
@Adjust(Date;0;1;0;0;0;0)

This example returns the date one month and one day from the current time-date.
@Adjust(@Now;0;1;1;0;0;0)
Given a date, this formula calculates the beginning of the week. It takes the date stored in the dueDate field, and returns the date representing the previous Monday. For example, if dueDate is 06/02/95, this formula returns 05/29/95.
@Adjust( dueDate; 0; 0; – ( @Weekday( dueDate ) – 2 ); 0; 0; 0 )
@Adjust(@Adjust([02/02/2006]; 0; 2; 0; 0; 0; 0); 0; 0; 28; 0; 0; 0)

@Date

Translates numbers for the various components of time and date, then returns the time-date value.
Syntaxe
@Date( year ; month ; day )
@Date( year ; month ; day ; hour ; minute ; second )
@Date( time-date )
Parameters
year
Number. The year that you want to appear in the resulting date. You must specify an entire four-digit year. (For example, use 1996, not 96).
month
Number. The month that you want to appear in the resulting date. (For example, use 1 to specify January).
day
Number. The day that you want to appear in the resulting date.
hour
Number. The number of hours. This value will be truncated from the resulting date.
minute
Number. The number of minutes. This value will be truncated from the resulting date.
second
Number. The number of seconds. This value will be truncated from the resulting date.
time-date
Time-date or time-date list. For a time-date value such as @Now or [10/31/93 12:00:00], @Date removes the time portion of the value, leaving only the date.
Valeur retournée
truncated TimeDate
Time-date. The date corresponding to the parameters that you sent to @Date, minus any time components.
Usage
If the parameter is a date-time list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Specifying invalid numbers will result in a blank date.
Exemples
This example returns 06/23/95.
@Date(1995; 06; 23)
This example returns 06/23/0095.
@Date(95; 06; 23)
This example returns 06/23/2095.
@Date(2095; 06; 23)

@Day

Extracts the day of the month from the specified date.
Syntaxe
@Day( timeDateValue )
Parameters
timeDateValue
Time-date or time-date list. The date containing the day value that you want to extract.
Valeur retournée
dayOfMonth
Number or number list. The number corresponding to the day of the month indicated by timeDateValue. Returns -1 if the time-date provided contains only a time value and not a date.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
This example returns 15 if today is July 15, August 15, September 15, and so on.
@Day(@Now)
This example returns 20 and 21 in a list.
@Day([11/20/95 8:58:12] : [11/21/95 8:58:12])
This example returns the string "Payment received on or before the 15th" if the PaymentReceived field is filled in on or before the 15th of the month; otherwise, it returns the string "Payment received after the 15th."
@If(@Day(PaymentReceived)<16;"Payment received on or before the 15th";"Payment received after the 15th")

@Month

Extracts the number of the month from the specified time-date.
Syntaxe
@Month( time-date )
Parameters
time-date
Time-date or time-date list. The value with the month that you want to extract.
Valeur retournée
month
Number or number list. The number of the month. Returns -1 if the time-date provided contains only a time value and not a date.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
This example returns 1.
@Month([1/15/88])
This example returns 1 and 2 in a list.
@Month([1/15/88] : [2/15/88])
This example returns 12 if it is December.
@Month(@Now)

@Text

Converts any value to a text string.
Syntax
@Text( value ; format-string )
Parameters
value
Number, time-date, text, list thereof, or rich text. The value you want to convert to text.
format-string
Text or text list. Optional. Up to four format-strings (see table that follows). These determine how the text is returned. If the value is already a text data type, the format-string is ignored.
Return value
textValue
Text or text list. The value you specified, converted to text. If you used any format-strings, they are applied.
@Text with time-date components
There are four separate categories of time-date, format-string components. You can include up to four components, but only one from each category.

Symbol Meaning
D0 Month, day and year
D1 Month and day, year if it is not the current year
D2 Month and day
D3 Month and year
T0 Hour, minute, and second
T1 Hour and minute
Z0 Always convert time to this zone
Z1 Display zone only when it is not this zone
Z2 Display zone always
S0 Date only
S1 Time only
S2 Date and time
S3 Date, time, Today, or Yesterday
Sx Use when you cannot predict the exact format of the value being passed, but you know that it is either a time, a date, or both.

Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Once a number value is converted to text, you will not be able to use the number for arithmetic calculations.
Examples
This example returns 123.45.
@Text(123.45)
This example returns $800.00 if the value in the Sales field is 800.
@Text(Sales;"C,2")
This example returns 8.00E+02.
@Text(800;"S")
This example returns 8.00E+02 and -6.00E+02 in a list.
@Text(800 : (-600);"S")
This example returns 04/11/93 10:43 AM.
@Text(@Now)
This example returns 04/11.
@Text(@Now;"D1S0")
This example returns 10:43:30 AM.
@Text(@Now;"D1S1")
This example returns 04/93 10:43 AM.
@Text(@Now;"D3T1")
This example returns the rich-text Body field stripped of attachments and formatting.
@Text(Body)
To convert a number date (in the ShipDate field) into a written date, you can use the following code. If ShipDate contains [08/31/2002], the result is "August 31, 2002."
@If( @IsTime(ShipDate);
@Text(@Select(@Month(ShipDate); "January"; "February"; "March"; "April"; "May"; "June"; "July"; "August"; "September"; "October"; "November"; "December")) + " " +
@Text(@Day(ShipDate)) + ", " + @Text(@Year(ShipDate));
"No date given")

@Today

Returns today’s date.
Syntaxe
@Today
Valeur retournée
today
Time-date. Today’s date.
Usage
This function is identical to the formula @Date(@Now). It is usually used in default value formulas to automatically enter the current date.
Using @Today in column or selection formulas may impact the efficiency of your application. It also causes the view refresh indicator to display constantly.
Exemples
This example returns 02/19/93 if today is February 19, 1993.
@Today
This example sets the field named ReceivedDate to today’s date.
FIELD ReceivedDate:=@Today

@Weekday

Computes the day of the week and returns a number that identifies the day.
Syntaxe
@Weekday( time-date )
Parameters
time-date
Time-date or time-date list. The date having the weekday value you want.
Valeur retournée
weekdayNumber
Number or number list. Weekday numbers are 1 through 7, with Sunday = 1, Monday = 2, and so on.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
This example returns 5.
@Weekday([9/29/88])
This example returns 2 if the date in the response field happens to fall on a Monday.
@Weekday(ResponseDate)

@Year

Extracts and returns the year from the specified time-date value.
Syntaxe
@Year( time-date )
Parameters
time-date
Time-date or time-date list. The time-date of the year you want.
Valeur retournée
year
Number or number list. The year of time-date. @Year returns the year relative to the time zone in which the date was generated. Returns -1 if the time-date provided contains only a time value and not a date.
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
Exemples
This example returns 1995.
@Year([9/29/95])
This example returns 1995 and 2008.
@Year([9/29/95] : [9/29/08]

@Now

Returns the current time­date. Valeur retournée now Time-date. The current time-date of the server containing the current database.  Using @Now in column or selection formulas may impact the efficiency of your application. It also causes the view refresh indicator to display constantly.

The @Now function returns the current time with one hundredths of a second precision. However, if you use @Now to specify the current time in a computed field, the hundredths of a second value is always rounded up to the next second, which can result in the current time being one second fast. You can avoid this by replacing @Now with the following formula:

timenow := @Now;

@Date(@Year(timeNow);@Month(timeNow);@Day(timeNow);@Hour(timeNow);@Minute(timeNow);@Sec(timeNow))