I have a table.
as you can see created_date column is timestamp field. now on selection i want to consider only date value. for e.g if i want to make selection of rows from today i want to do something like:-
select * from audit_logs where created_date = '2018-11-28';
the above query returns null. is it possible to make selection this way ?
You can use date()
function
select * from audit_logs where date(created_date) = '2018-11-28'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With