Jump to content

date comparison


blue-genie

Recommended Posts

117 test 2010-05-12 2010-05-18 0 5 1 2010-05-17 10:56:30 9

118 uni 2010-05-19 2010-05-26 0 5 1 2010-05-17 11:14:07 9

119 test1 2010-05-27 2010-05-28 0 3 1 2010-05-18 11:19:50 9

 

assume the data above in a table.

items 118 is the only one who's start date /end date is within the current date (ie 2010-05-26) so i need some help with that .

 

SELECT gameID from gamedetails where date('2010-05-26') >= startDate AND date('2010-05-26')<= endDate AND gameIsActive = 1

seems to work but I just want to be sure.

Link to comment
Share on other sites

edit: nevermind, I posted before you edited and actually put your question.

 

try:

 

SELECT gameID from gamedetails where startDate >= date('2010-5-26') AND endDate < AND date('2010-5-26') AND gameIsActive = 1 is not right.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.