Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-21-2005, 11:55 PM   PM User | #1
Cipher
Regular Coder

 
Cipher's Avatar
 
Join Date: Dec 2004
Posts: 123
Thanks: 0
Thanked 0 Times in 0 Posts
Cipher is an unknown quantity at this point
Question 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.
Cipher is offline   Reply With Quote
Old 09-22-2005, 03:30 AM   PM User | #2
Brandoe85
teh Moderatorinator


 
Join Date: Sep 2004
Location: USA
Posts: 2,472
Thanks: 4
Thanked 40 Times in 40 Posts
Brandoe85 will become famous soon enough
In Sql server, you don't use the '#', change those to single quotes and you should be good to go.
__________________
-Brando
Why using tables for eating is stupid!
Brandoe85 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Advertisement
Log in to turn off these ads.