Jump to content

Archived

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

baber_abbasi

MYSQL - Date match

Recommended Posts

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??

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

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.