How does varchar compare size?

I have a field of type VARCHAR that has a time data stored in it, but I want to compare it with it because I only want to leave the largest time in the same data, because the format of the time data is such a data with spaces.

Sql
Mar.18,2021

ascii ('ok') ascii (col_name)


convert varchar type to datetime type before comparing. There are two ways to convert

CAST('2018-6-12 09:57:03' as datetime)

CONVERT(datetime, '2018-6-12 09:57:30')
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38ee2-2c147.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38ee2-2c147.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?