mei_913 Posted August 1, 2006 Share Posted August 1, 2006 HI everyone! I have a problem with finding date within a range.In my database, there's a table with a field "updatedate", which is of date type.I want to find out the record with an "updatedate" within a range (typed by user), but i do not know the syntax for comparing date (YYYY-MM-DD). I've tried ">=" and "<=" but in vain.Can anyone help me?? Thanks a lot!!! Link to comment https://forums.phpfreaks.com/topic/16209-data-with-type-date~~-question-about-comparing-date/ Share on other sites More sharing options...
fenway Posted August 2, 2006 Share Posted August 2, 2006 It's no different that comparing to string literals... but personally, I prefer using BETWEEN() because it's much more obvious what you're doing. Link to comment https://forums.phpfreaks.com/topic/16209-data-with-type-date~~-question-about-comparing-date/#findComment-67819 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.