Issue Description:
One of the SAS Date format Data Type is unable to read by Spotfire "yymmdd10" which is ISO Standard. The retrieved data is irrelevant. For instance 21600 is equivalent to 2019-02-20 in SAS.
Cause:
SAS uses 1960-01-01 as the reference date for the way it stores dates.
The following TERR (or R) command confirms that 21600 is the number of days between 1960-01-01 and 2019-02-20:
>
>
> diff(as.POSIXct(c("1960-01-01", "2019-02-20")))
Time difference of 21600 days
>
So this appears to be a data type conversion issue within the SAS OLEDB Providers.
Solution:
You can bring the data to Spotfire and Create a Calculated column to extract the Date and DateTime.
Calculated Column for Date:
Date -- DateAdd('day',[Date of First Exposure to Treatment],Date('1960-01-01'))
DateTime -- DateAdd('ss',[Datetime of First Exposure to Treatment],DateTime('01/01/1960 12:00:00 AM'))
Example Data:
Date of First Exposure to Treatment | Datetime of First Exposure to Treatment | Date | DateTime |
21283 | 1838883660 | 4/9/2018 | 4/9/2018 9:01 |
21332 | 1843118400 | 5/28/2018 | 5/28/2018 9:20 |
21340 | 1843819380 | 6/5/2018 | 6/5/2018 12:03 |
21390 | 1848133800 | 7/25/2018 | 7/25/2018 10:30 |
21398 | 1848825900 | 8/2/2018 | 8/2/2018 10:45 |
21430 | 1851585780 | 9/3/2018 | 9/3/2018 9:23 |
21488 | 1856608620 | 10/31/2018 | 10/31/2018 12:37 |
21493 | 1857026640 | 11/5/2018 | 11/5/2018 8:44 |
21549 | 1861873200 | 12/31/2018 | 12/31/2018 11:00 |
21570 | 1863704400 | 1/21/2019 | 1/21/2019 15:40 |
21573 | 1863956580 | 1/24/2019 | 1/24/2019 13:43 |
21584 | 1864890000 | 2/4/2019 | 2/4/2019 9:00 |
21594 | 1865777400 | 2/14/2019 | 2/14/2019 15:30 |
Attached the Sample Dashboard for reference.
Comments
0 comments
Please sign in to leave a comment.