|
Posted by Hendri Kurniawan on 08/02/07 10:07
Chris Tate-Davies wrote:
> Hello. I have a generic table used for many different generic
> functions. the fields are mainly varchar's but one of these varchars
> contains dates (in the format dd/mm/yyyy) for one reason or another.
>
> My question is, can I perform a query on this table, using date
> functions on this varchar field? I.e. search for the latest date?
>
> Thanks, Chris
>
Take a look at STR_TO_DATE, and use it like:
SELECT * FROM table ORDER BY STR_TO_DATE(coldate, '%d/%m/%Y')
Let us know whether it works or not
Hendri Kurniawan
Navigation:
[Reply to this message]
|