Item Rule Data Types
Attributes in item rules belong to one of a set of data types.
In item rule expressions, all values are of one of the data types listed in the following table.
Data Type |
Description |
---|---|
String |
All strings and text characters |
Number |
All decimals and integers |
Date |
Dates only, without times |
Time |
Times only, without dates |
DateTime |
Combination of Date and Time |
Null or Empty Values
Any attribute referenced in an item rule can have
an empty or null value. To test for empty or null values you must
use the function isnull
.
Strings
Strings are delimited by double or single quotation
marks ("
or '
).To escape a character's normal value (for example, in a regular
expression), prefix it with the backslash (\
).
Numbers
Depending on the setting of the regional preference
for number format, the decimal point in decimal numbers can be represented
by either a period character (.
) or
by a comma (,
). If the comma is used
as a decimal point, then arguments to functions must be delimited
by semicolons (;
).
Dates and Times
Dates and times are represented by the types Date, DateTime, and Time.
Dates will be entered in the format that you specify in the setting of the regional preference for date format . Date constants will automatically be reformatted if a you log in with a difference preference.
The following expression using a Date value is valid:
[Item].[Logistics].[StartDate] > "2005-Feb-23"
When writing an expression containing terms representing dates and times, enclose them in double quotation marks. They're internally converted to String values before they're compared. The following expression compares an attribute value to a textual date term.
Days can be added to a Date using Numbers. For example, the following expression computes the sell date as 30 days after the availability date:
[Item].[Logistics].[SellDate] > [Logistics].[AvailableDate] + 30
You can't perform date calculations involving Custom Calendars.