Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATE BETWEEN PROBLEM

Status
Not open for further replies.

Silvinho

Programmer
Jul 9, 2001
58
0
0
GB
I have a messageboard that has a feature that can select the messages from the last 3 days or 14 days etc..

The problem was when i switched from MS Access to SQL the query doesnt work anymore.

the original query contained:(messageboard_Subject.DateCreated) Between (Now())-0 And (Now())-3"

This returned the error message:
Microsoft OLE DB Provider for SQL Server (0x80040E21)
The requested properties cannot be supported.


Is this sort of query possible?

What are the differences between SQL and Access using the BETWEEN action?

Any help would be gratefully appriciated.
 
Hi,

In SQL Server there is no Now function that is y u r getting that error.. use getdate() instead of that...

something like this..
Between getdate() And getdate()-3

Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top