CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   ASP.NET (http://www.codingforums.com/forumdisplay.php?f=40)
-   -   SQL DateTime Problem (http://www.codingforums.com/showthread.php?t=68699)

Cipher 09-21-2005 11:55 PM

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.

Brandoe85 09-22-2005 03:30 AM

In Sql server, you don't use the '#', change those to single quotes and you should be good to go.


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.