KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Adding a value to a time variable
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: April 10, 2002

Compatibility: 6.5.x and 6.7.x

If you add a numerical value (real, long integer, integer) to a variable which contains a time value, the resulting variable will contain a numerical value. To avoid this behavior, you might use the following code:


vTime:=Current time
$ValueToAdd:=$WantToAddThisValue + 0 ` $WantToAddThisValue can be a numerical value or a time value

` ValueToAdd will become a numerical value

vTime:=vTime + Time("00:00:"+String(ValueToAdd))