View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 09:06 AM
Captain Paralytic
 
Posts: n/a
Default Re: mySQL date querying

On 5 Feb, 13:05, "davidjohnl...@googlemail.com"
<davidjohnl...@googlemail.com> wrote:
> 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


Reformat the date to the ISO one used by MySQL.

Reply With Quote