Jump to content

Complex DATETIME query


completeamateur

Recommended Posts

Hello,

 

I'm trying to query a database to obtain the correct results for a particular season.  I'm trying to do this...

 

(YEAR(datetime) = 2008 AND MONTH(datetime) < 07) OR

(YEAR(datetime) = 2007 AND MONTH(datetime) >= 07)

 

but it returns no rows.

 

Confused as using one or the other works so I don't see why I can't use both.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/110920-complex-datetime-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.