ToTime

ToTime(number or string)

Use the function IsTime to check whether the number/string is right or not. If the number/string is right, the function returns a Time value between 00:00:00 and 23:59:59, otherwise it will return null.

Parameters

Return value

Time value or null.

Examples

ToTime(DateTime a)

This function extracts the time portion from a specified TimeStamp value.

Parameter

a - A TimeStamp value.

Return value

The return value is a Time.

Example

Suppose the date is July 15,1999 and time is 10:55:45. The return value of the following statement is 10:55:45.

ToTime(ToDateTime(1999, 7, 15, 10, 55, 45 ))

ToTime(Integer t)

This function converts the argument t (A milliseconds value represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT) to a Time value.

Parameter

t - A milliseconds value, a DBField value or a parameter. It should be a long integer.

Return value

The return value is a Time.

Example

The return value of the following statement is 08:00:01.

ToTime(1000)

Note: When the milliseconds value is larger than 2³², you should use DBField or parameter instead.

ToTime(Integer a, Integer b, Integer c)

This function creates a Time value from argument a, b and c.

Parameters

Return value

The return value is a Time.

Example

The return value of the following statement is 10:10:10.

ToTime(10, 10, 10)