Jan 21, 2011 #1 bmann Programmer Oct 8, 2002 128 US I am having problems selecting records by date using the = sign. What is wrong with this select statement. The field timestamp is of type datetime. select * from perimage where timestamp = '2007-11-15'
I am having problems selecting records by date using the = sign. What is wrong with this select statement. The field timestamp is of type datetime. select * from perimage where timestamp = '2007-11-15'
Jan 21, 2011 #2 markros Programmer May 21, 2007 3,150 US If you need to get all records for that date, use select * from perimage where Timestamp>='20071115' and Timestamp < '20071116' See these two blogs for the explanations of how to work with datetime values The ultimate guide to the datetime datatypes Bad habits to kick : mis-handling date / range queries PluralSight Learning Library Upvote 0 Downvote
If you need to get all records for that date, use select * from perimage where Timestamp>='20071115' and Timestamp < '20071116' See these two blogs for the explanations of how to work with datetime values The ultimate guide to the datetime datatypes Bad habits to kick : mis-handling date / range queries PluralSight Learning Library