Sony Hejmady Posted October 4, 2019 Share Posted October 4, 2019 I want to get 60 days data from a date field transaction_date .In tibcommunity I got this code DATEDIFF(day, %1, GETDATE()) < 60 Not sure where to apply this in the fllowing sql code in fo link.Can we apply in filter If yes please send screenshot. This is my sql code in information link. SELECT a."match date" AS "MatchDate", a."transaction_date" AS "Tran DATE", FROM "app"."salpayemnts" o1 Link to comment Share on other sites More sharing options...
Richard Pobi Posted October 4, 2019 Share Posted October 4, 2019 SELECT a."match date" AS "MatchDate", a."transaction_date" AS "Tran DATE", FROM "app"."salpayemnts" o1 wherea."transaction_date" >DateAdd(d, -60, GetDate()) Second Option is to load all the data into spotfire without filtering for the last 6o days. Then use the below steps to filter for the last 60 days in your visualization. Properties>Data>Limit data using expression click edit> "transaction_date" >DateAdd(d, -60, DateTimeNow()) Link to comment Share on other sites More sharing options...
Sony Hejmady Posted October 4, 2019 Author Share Posted October 4, 2019 Thanks Rich . But I am getting error as column "d" does not exist Position Why code is considering d as column.Any idea Link to comment Share on other sites More sharing options...
Richard Pobi Posted October 4, 2019 Share Posted October 4, 2019 Sorry its DateTimeNow() not GetDate() a."transaction_date" > DateAdd(d, -60, Date(DateTimeNow()) or a."transaction_date" > DateAdd(d, -60,DateTimeNow()) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now