date format

S

smk23

I need to pass the value of Now() to a SQL statement. I am getting a syntax
error because what is being passed is '7/9/08 08:15:00 AM' . I am pretty sure
that it's the "AM" that's the problem. How can I get around this?

Thanks,
Sam
 
D

Douglas J. Steele

How are you passing it?

If you're creating the SQL statement via VBA, use the Format function on the
Now function call.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top