KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Converting a time value to a tick count and vice versa
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: August 31, 2001

The following methods will help you convert a time value into a tick count and vice versa.

` Project Method: TimeToTick
` Description: Convert a time value to a tick count
`
` Add Komoncharoensiri - 4D, Inc.
C_TIME($1)
C_LONGINT($0)
$0:=$1*60

` Project Method: TickToTime
` Description: Convert a tick count to a time value
`
` Add Komoncharoensiri - 4D, Inc.
C_TIME($0)
C_LONGINT($1)
$0:=Time(Time string($1/60))

Example:

- SET TIMER(TimeToTick (?00:00:10?))

- DELAY PROCESS (MyProcess; TimeToTick (?01:30:00?))