PDA

View Full Version : SQL DateTime Problem


Cipher
09-22-2005, 12:55 AM
i'm having a web forum and i wanna make a page to show all Today's Posts, and i'm using MS SQLServer 2000, so i tried to do this in the SQL Statment:

Where Posts.DatePosted Between #09/20/2005# AND #09/22/2005#

But it appeared this error:

Incorrect syntax near '#'.

So can any body tell me a good way to do this.

Brandoe85
09-22-2005, 04:30 AM
In Sql server, you don't use the '#', change those to single quotes and you should be good to go.