I have a column with name DDateTime
and it's type is DateTime
.
I want to compare only date from DDateTime
with input date.
Example: '14-05-2018 08:00:00' = '14-05-2018'
How can I compare only date from DateTime
variable?
$sql = "SELECT *
FROM ride
WHERE RideFrom = '$RideFrom'
and RideTo = '$RideTo'
and CONVERT(VARCHAR(10), DDateTime, 103) = '14-05-2018';";
I tried this query but it did not work