Jump to content

How to make an information link with a datetime column filtered like >= now() ?


Yannick BRES
Go to solution Solved by Niko Maresco,

Recommended Posts

Hi Yannick,

The filtering is typically handled in the WHERE clause of the SQL.

If possible, you could alter the SQL statement of the Information link directly and add this line to the WHERE clause:

SELECT *
FROM table
WHERE
datetime > getdate() (in case it's SQL Server).

You can also create a Filter object for the same, and add it to the Information Link:
image.thumb.png.0af853e19437c3f212f0b23e6c5acc08.png

Adding this filter to the Information link, will update the SQL automatically (without the need for changing it yourself):
image.thumb.png.a2ae60d41a4294f852deac5b9148270d.png

Kind regards,

David

  • Like 1
Link to comment
Share on other sites

  • Solution

hi Yannick

in that case you want CURRENT_DATE. your query would be something like

SELECT
  A1."Column"
FROM
  "Table" A1
WHERE
  A1."TimeColumn" >= CURRENT_DATE

that should work. if you have any issues you can try these variations which should result in the same:

(SELECT CURRENT_DATE FROM DUAL)
(SELECT SYSDATE FROM DUAL)

 

  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...