Geeks With Blogs

The Wrecking Bawl Destructuring query language, one keyword at a time.

If you've never passed a date as a parameter to a stored procedure while attempting to use the debugger in SQL Query Analyzer, you probably don't know that the date must be in a certain format (ain't nothin' but an ODBC thing) in order for things to work.  If the date is not in the format [YYYY-MM-DD] or something similar (my new motto: dashes not slashes, or hyphens not... nothing really rhymes with hyphens), then you will get an error like this: 

[Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification

Posted on Tuesday, February 27, 2007 7:30 PM all tech stuff , SQL Server | Back to top

Comments on this post: The More You Know (cue music): SQL Query Analyzer

# re: The More You Know (cue music): SQL Query Analyzer
Requesting Gravatar...
Thank you!!!! I knew it had to do something with my formatting of that parameter. I tried all sorts of things including:


I even tried Cast('3/22/2009' as datetime) before I found your post. It's over two years old, but still helping people. :)
Left by Vicky on Mar 23, 2009 5:02 AM

Your comment:
 (will show your gravatar)

Copyright © Alex Bransky | Powered by: