My data contains a field [StartDate].
This is coming from a SQL Server table source and is a datetime type.
To show how old each record is, I created a view in Data Insight, and added a column thus :
Column [Age] = date_diff( ###.StartTime, to_date( sysdate(), 'YYYY.MM.DD'), 'DD')
I also only want to see items <=30 days old, so I added a filter in a similar fashion :
date_diff( ###.StartTime,to_date( sysdate(),'YYYY.MM.DD'), 'DD') <= 30
Now the interesting thing is the resulting data preview.
I am staring at my calculated column [Age] , and seeing values of 31 staring right back at me !?
Here's the values (SystemTime & StartTime) from 1 row , put into Excel and the Age recalculated:
SystemTime | StartTime | System-Start | |
2015-06-12 11:32 | 2015-05-12 06:20 | 31.2 |
.. so given that, the data preview shows that the Age is being calculated correctly.
Yet the filter is not working correctly.
Any ideas !!??