Xbasic

*add_seconds Function

Syntax

dim newTime as T = *ADD_SECONDS(time as T, seconds as N)

Arguments

timeTime

A time value.

secondsNumeric

The number of seconds to add to the time value. Seconds can be a negative value.

Returns

newTimeTime

Returns the time value incremented by seconds.

Description

Add seconds to date or time.

Example

dim time as t
time = now()
? time
= 10/12/2017 08:54:05 89 am

dim increment as n
increment = round(rand()*100,0)
? increment
= 29

? *add_seconds(time, increment)
= 10/12/2017 08:54:34 89 am

See Also