Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: SQL DateTime Problem
09-22-2005, 12:55 AM #1
SQL DateTime Problem
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.
09-22-2005, 04:30 AM #2
- Join Date
- Sep 2004
- Thanked 40 Times in 40 Posts
In Sql server, you don't use the '#', change those to single quotes and you should be good to go.