SQL query with operator between and date in a strange format -
i have column in table stores date in format (dd-mm-yy hh:mm:ss). e.g.:
05-06-15 01:02:03
i need output instance records have date between 4th , 5th of june, tried:
select * table date between '04-06-15 00:00:00' , '05-06-15 23:59:59'
but output results different month, as:
05-07-15 14:52:34
is there way use single query solving issue or have change database date format?
select * table str_to_date(date,'%d-%m-%y %t') between '2015-06-05 00:00:00' , '2015-06-5 23:59:59';
Comments
Post a Comment