Jump to content


Photo

MYSQL - Date match


  • Please log in to reply
1 reply to this topic

#1 baber_abbasi

baber_abbasi
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts
  • LocationPakistan

Posted 24 August 2006 - 02:44 PM

Hi,

I need to fetch records between defined date ranges i.e Date from 01/08/2006 to 15/08/2006.

I am using following command to do above task but its not bringing accurate data.

SELECT * FROM ABC WHERE date BETWEEN '01/08/2006' AND '15/08/2006'

Can anyone help??
Baber N Abbasi

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 24 August 2006 - 02:53 PM

would the date format not be YYYY-MM-DD and not DD-MM-YYYY therefore as far as i know "SELECT * FROM ABC WHERE date BETWEEN '2006-08-01' AND '2006-08-15'" should work

Regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users