What TERR object class does the Spotfire data function framework recognize as date/time information?

What TERR object class does the Spotfire data function framework recognize as date/time information?

book

Article ID: KB0081609

calendar_today

Updated On:

Products Versions
Spotfire Analyst All supported versions

Description

What TIBCO Enterprise Runtime for R (TERR) object class does the Spotfire data function framework recognize as date/time information?
 

Issue/Introduction

What TIBCO Enterprise Runtime for R (TERR) object class does the Spotfire data function framework recognize as date/time information?

Environment

All

Resolution

Spotfire data functions recognize TERR objects of class "POSIXct" as date/time information. As designed, the Spotfire/TERR data function interface for date/time information does the following:

   - Converts a Spotfire value or column whose DataType is "Date", "Time" or "DateTime" into a TERR object of class "POSIXct".

   - Converts a TERR object of class "POSIXct" into a Spotfire value or column with a DataType of "DateTime", which can then be formatted in Spotfire to display only the date (or to display only the time) if needed.

This interface does not use any other TERR object classes (such as the "Date" class in TERR) to transfer date/time information between Spotfire and TERR.

Additional notes:

1). The Sys.Date() function in TERR returns a TERR/R object of class "Date" which the Spotfire/TERR data function interface does not treat as date/time information.  Because of this, a TERR object of class "Date" will be imported into Spotfire as a numeric column with a DataType of "Real" and values that correspond to the time span in days between each cell's date and the TERR/R "Date" class's 1/1/1970 reference date.

>
> Sys.Date()
[1] "2017-05-12"
>
> class( Sys.Date() )
[1] "Date"
>


2). The Sys.time() function in TERR returns a TERR/R object of class "POSIXct" which the data function interface converts into a Spotfire value or column with a DataType of "DateTime".

>
> Sys.time()
[1] "2017-05-12 08:50:21 PDT"
>
> class( Sys.time() )
[1] "POSIXct" "POSIXt"
>