I am currently storing dates in a mySQL database with the format of
12:54 pm July 22nd
If I do a regular sort using Order by that field it sorts it by the time.
Is it possible to sort by date now that the site is already using that format in a single field.
Hi,
I am not an guru but i think that it is not possible from the mysql side. You might be able to code a function on c and use that as a module for mysql or you could code something in php that would do it.. But i think your best bet is to make your date conform to the timedate dataset.
If you do decide to convert your data.. i could post a perl script convert the date..
You should really store the value in a datetime column. If you need some specific format you should do that when retrieving data.
Anyhow, you can cast the value as date when ordering
select * from ogrish cast(bleb as date)