I have a database with a table, jobs and i have written this query to get information from this table. But i am getting no results with this data and i have no idea why?

SELECT startDateTime, endDateTime FROM jobs WHERE startDateTime BETWEEN '19/11/2013' AND '20/11/2013'

Database Structure:

1 jobId int(11)
2 customerId int(11)
3 addressId int(11)
4 description text
5 startDateTime datetime
6 endDateTime datetime

Data:

1 | 1 | 1 | Light fitting | 2013-11-19 14:00:00 | 2013-11-19 16:00:0

Try using Y-M-D format, see if that works?

SELECT startDateTime, endDateTime FROM jobs WHERE startDateTime BETWEEN '2013-11-19' AND '2013-11-20'

Thanks worked great!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.