isTime function

The isTime function checks whether the data type of the attribute specified in the string parameter is time.


Parameters

isTime(string, binary)

Parameter

Description

string

The nominal attribute to be tested. The string parameter is mandatory.

binary

If the optional binary parameter is True, or not specified, results will be provided as Booleans (True/False), while if it is False, results will be provided in binary form (1/0).

The binary parameter values (True/False) are case sensitive.

Time type valid formats (if the values aren’t this format, the function will return a False or 0).

  • 17:27:35;

  • 17:27:35.120;

  • 17:27


Example

The following example uses the Flights in Brasil dataset.

Description

Screenshot

In this example, we want to check if the Partida.Prevista attribute is a time attribute.

We add a new attribute and write the following formula:

isTime($"Partida.Prevista",False)

The function has returned 0, because the values aren’t written in one of the formats above.