Ask Your Question
1

query where date field = current_date +1

asked 2017-05-05 17:13:35 +0100

jcp2mill gravatar image

Hi I have a table of tv recordings where each recording has a title id date to be recorded and watched, I want to be able to filter these so that I can look at recordings that are due to take place tommorow

I've tried

Select * From "Mytable" Where "DAtefield" = CURRENT_DAY + 1

Select * From "Mytable" Where "DAtefield" = CURRENT_DAY + 1 DAY

and

Select * From "Mytable" Where "DAtefield" = SYSDATE + 1

none of them work anyone have ny ideas of why I also tried DATE_DIFF and still no luck.

Thanks

edit retag flag offensive close merge delete

Comments

1

Which database you use makes a great difference as to the answer. If this is an embedded DB, then it is HSQL v1.8 otherwise please specify which you are using.

Ratslinger gravatar imageRatslinger ( 2017-05-05 17:25:11 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-05-05 19:51:43 +0100

librebel gravatar image

Hello jcp2mill, you could try:

SELECT * FROM "Mytable" WHERE DATEDIFF('day', TODAY,  "DAtefield") = 1
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-05-05 17:13:35 +0100

Seen: 47 times

Last updated: May 05 '17