• c# and Sql
    6 replies, posted
Hey, I'm sorry if this seems like a stupid question, but i've been looking at this query for like 30 mins now and it wont work. (there was a much more complex query, but it wasn't liking the date) SELECT *FROM Meal WHERE MealDate = 06/12/2010; It returns nothing, the table is called Meal, the field is called MealDate and there is a date of 06/12/2010 in the database. Nothing shows, has anyone got any ideas?
SELECT * FROM Meal WHERE MealDate='06/12/2010';
Tried it, Data type mismatch in criteria expression.
How are you storing the date? As the date type or just as text?
Date/Time
SELECT * FROM Meal WHERE MealDate='2010-12-06'; Are you including the time into there?
oh that didn't work but SELECT * FROM Meal WHERE MealDate=#2010-12-06# did Bloody hell I hate access!!
Sorry, you need to Log In to post a reply to this thread.