Query date next 10 days

Hi all,
I am using LO 6.4.2. I would like a query that will give me all the info requested between now and now + 10 days. In design view, under my first Date field I have NOW(). What would go in the second Date field?
Thanks for any help you can provide

  • Jody

To give context,
I have a query built, when run, the user must enter a start date and an end date and all reservations between those dates are returned. I would like to get rid of the user input parameter and just have the query run and return the next 7 days of reservations

Hi

[EDIT]

The syntax to calculate the addition of a number of days:

  • for firebird: SELECT "Date", DATEADD (10 day to "Date") "Date+10" FROM "Table"
  • for Hsqldb: SELECT "Date", DATEDIFF( 'DD', '1899-12-30', "Date" ) + 10 "Date+10" FROM "Table"

Syntax applied to select with Hsqldb:

SELECT "Date" FROM "Table" WHERE
DATEDIFF( 'DD', '1899-12-30', "Date" ) >=  DATEDIFF( 'DD', '1899-12-30', CURRENT_DATE ) 
AND
DATEDIFF( 'DD', '1899-12-30', "Date" ) <=  DATEDIFF( 'DD', '1899-12-30', CURRENT_DATE ) + 10

Regards

I am on HSQLDB and this SQL returns all my records and just adds 10 days to each entry.
I want the query to return my reservations between now and the next 10 days only

Sorry @jodybingo, I understood the question but, taken over time, I only gave the general syntax for the calculation, not the application to your case… I updated my answer.

Regards