paul2463 Posted December 7, 2006 Share Posted December 7, 2006 Hi guysa simple question, if I use the following in my query(all variables are set somewhere else in the function) information is not really required for this question.[code]AND date BETWEEN '$fdate' AND '$tdate'[/code]does this query INCLUDE the "from date" and "to date" or just the dates in between????as I said a simple question but only simple if you know the answer Quote Link to comment https://forums.phpfreaks.com/topic/29832-between-dates/ Share on other sites More sharing options...
obsidian Posted December 7, 2006 Share Posted December 7, 2006 BETWEEN is inclusive as far as I know. At least, that's the way it has seemed to me when I've used it ;) Quote Link to comment https://forums.phpfreaks.com/topic/29832-between-dates/#findComment-137052 Share on other sites More sharing options...
paul2463 Posted December 7, 2006 Author Share Posted December 7, 2006 thanks Obs Quote Link to comment https://forums.phpfreaks.com/topic/29832-between-dates/#findComment-137058 Share on other sites More sharing options...
artacus Posted December 7, 2006 Share Posted December 7, 2006 Yes its inclusive, but when you are in doubt about these things, just test them SELECT IF('2006-12-01' BETWEEN '2006-11-01' AND '2006-12-01', 'YES', 'NO') Quote Link to comment https://forums.phpfreaks.com/topic/29832-between-dates/#findComment-137103 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.