How to add a day on a select statment

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

The following select statment doesn't work for my Access database. It
doesn't return any data.

SELECT ID FROM adj
WHERE EndDate-1<[Date]

It works if the database is from my company server via a link. It also works
in my local Access database if I delete the '-1'.
I use Date/Time as the data type for the EndDate column.

I tried DateAdd Function.

Please help!
 
Sam said:
The following select statment doesn't work for my Access database. It
doesn't return any data.

SELECT ID FROM adj
WHERE EndDate-1<[Date]

It works if the database is from my company server via a link. It also works
in my local Access database if I delete the '-1'.
I use Date/Time as the data type for the EndDate column.

I tried DateAdd Function.


DateAdd is the preferred approach. Are you sure you are
entering a good date in the prompt popup? If your Windows
settings have a different date format than you are using,,,
 
Back
Top