Groups | Blog | Home
all groups > sql server programming > february 2004 >

sql server programming : Query Analyzer ( easy Q )


CSharp ( ILM )
2/10/2004 10:20:12 PM
Hello,

when using Query Analyzer to Debug my stored procedure

I get the following error when inputting datetime values

ERROR: Invalid character value for cast specification

How can I assign a date like 1/1/2005 to a Parameter?? without getting the
error above

I tried '1/1/2005' or "1/1/2005" or 1-1-2005 or 2/7/2004 6:43:05 PM or
etc...
The only thing that works is null, but I don't want null

Thanks for any advice.

Jackie


Greg Linwood
2/11/2004 5:25:56 PM
Try '20050101' - 'yyyymmdd' format always works & is a good approach if you
really need to work with dates in varchar / string variables.

Regards,
Greg Linwood
SQL Server MVP

[quoted text, click to view]

AddThis Social Bookmark Button