Basic Syntax CrystalClear Syntax

Operator "-"


This operator subtracts the second operand from the first and returns the result. Depending on the value types of the two operands, the value type of the result can be the same as one of the two operands or even a completely different value type, as in the case of a date minus a time, which returns a datetime.

Note the special meaning of the "-" operator in connection with dates:

Usage:

number1 - number2	// Returns number
number - currency	// Returns currency
time - number	// Returns time
date - number	// Returns date
datetime - number	// Returns datetime
time - number	// Returns time

Returns:

depends on operand value types

Examples (Same in Basic and Crystal syntax):

21 - 21				// Returns 0
21 - $21				// Returns $0
time(12,00,00) - 73		// Returns 11:58:47
date(2005,12,12) - 42		// Returns 10/31/2005
datetime(2005,12,12,5,5,5) - 42	// Returns 10/31/2005, 5:05:05 a.m.

See also:


i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to crystalclear@inetsoftware.de.

This page is: very poor very good
Comment: