The isDatetime function checks whether the data type of the attribute specified in the string parameter is datetime.
The nominal attribute to be tested. The string parameter is mandatory.
If it 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 following example uses the isDatetime dataset.
In this example, we want to check if the Date Posted attribute is a Datetime attribute.
We add a new attribute and write the following formula:
As we haven’t specified the binary parameter, True has been set as default, so the results will be provided as Booleans and not binary values (0/1).
If you want to delete the outliers, you can apply a filter to the isdatetime attribute.
In this example, as you can see, the value in row 5 of the Date Posted attribute is not a date, so the function has returned a False.
Here, we want to keep only those values which are of Datetime type, where the function has returned True.
So, drag the isdatetime attribute onto the Post-filter area and uncheck the False.
Then, click Apply and Make Persistent.
This is the final result after having post-filtered the isdatetime attribute.