Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: SQL Server DateTime Problem
09-21-2005, 11:56 PM #1
SQL Server 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, 06:23 AM #2
- Join Date
- Feb 2005
- Bradford, UK
- Thanked 65 Times in 64 Posts
Where Posts.DatePosted Between '09/20/2005' AND '09/22/2005' works fine for me
09-22-2005, 08:15 AM #3
- Join Date
- Jun 2002
- Thanked 236 Times in 233 Posts
# is only used in Access.
Tower of Hanoi Android app (Ad-FREE!)
Tower of Hanoi Android app (FREE!)
Tower of Hanoi Leaderboard
Samegame Facebook App
Samegame Facebook App Leaderboard
vBulletin 5 Floating Bar extension
vBulletin 5 Slideshow extension
vBulletin 5 Quote Selected Text extension
vBulletin 5 Profile Preview Tooltip extension
09-22-2005, 10:09 AM #4
Thank u too much, nancy ur solution worked, thanx, but i made it like this and it worked perfect:
HAVING MAX(Posts.DatePosted) >= '09/22/2005' AND MAX(Posts.DatePosted) < '09/23/2005'