NumberToTime() 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

Returns a Time value. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

NumberToTime( numeric_time )

numeric_time is an nine-digit integer in the form HHMMSSFFF, where HH is hour, MM is minutes, SS is seconds, and FFF is fractions. For example, 214237582 represents 9:42:37.582 P.M.

Return Value

Time

Example

dim fNum as integer
dim Y as time
fNum = 214237582
Y = NumberToTime(fNum)
Print FormatTime$(Y,"hh:mm:ss.fff tt")

See also:

Date and Time Functions, FormatTime$() function, GetTime() function, NumberToDate() function, NumberToDateTime() function