TimeAdd() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Use this function to add/subtract a provided value in time units from the time variable. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

TimeAdd (input_time, value, units)

input_time (DateTime): A time input parameter

value (Integer) : Positive/Negative value in time units

units (String): Time units from below values.
  • hr
  • min
  • sec

Return Value

Time

Example

dim tt as time
tt = 135211596
print TimeAdd(tt, 1, "hr")
//returns 145211596