Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Passing datetime to stored procedure w/ Access

Author  Topic 

Linok
Starting Member

34 Posts

Posted - 2006-06-12 : 13:58:30
Hey everyone,

I'm trying to test a SP through and it's giving me the following error:

Syntax error converting datetime from character string


The value I'm passing it is '9/12/2006', which has worked for all comparisions I've used in WHERE clauses, so I was assuming this is where I'm going wrong. I'm saving this as a variable in the stored procedure as a datetime, and all comparisions are with other datetime vars, so I wouldn't think it's a typecasting issue there.

Anyone have any ideas?

thanks in advance!

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2006-06-12 : 15:06:06
Datetime is in format date time.
you gave it the first part but not the second.
Example: 6/12/2006 11:47:42 AM

also you may want to look at Convert

Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -