View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 09:06 AM
davidjohnlong@googlemail.com
 
Posts: n/a
Default mySQL date querying

Hi,

I'm trying to convert the following query into mySQL, this currently
working with MS SQL although not with mySQL.

SET DATEFORMAT dmy declare @d datetime set @d = '01/12/2007' select *
from matrix.subscriptions where @d between startdate and enddate

The above query searches a date between two fields. (startdate and
enddate)

Anyone got any idea how this can be done within mySQL

Thanks for your help

David

Reply With Quote