SQL Server and Dates

M

Mike

I'm writing a calendar application and have encountered
one problem. I have a database that has these fields:
- event
- description
- eventDate

When a user selects a date from a calendar (eg. 10-20-
2003), how can I get all the records with that date to
show up. Currently if the date and time doesn't match, it
does not show. How can you query the sql server with out
regarding time?

ex: calendar - 10-20-2003
db - 10-20-2003 11:30:00

select event, description from calendar where eventDate =
@calendar

When executing this query, it does not find that record,
I'm assuming because of the time. How can I get around
that, Any suggestions?

Mike
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top