natalieG Posted May 5, 2006 Share Posted May 5, 2006 I have a date column that I plan to store as a string, ie 'jan 12,1996' I want order by thatcolumn. Can this be done. or should add a column to store the secondsfromEpoch in the second columnand get the date strin g when I need it. Thanks,Jennifer Good Link to comment https://forums.phpfreaks.com/topic/9150-date-sort/ Share on other sites More sharing options...
.josh Posted May 5, 2006 Share Posted May 5, 2006 if you store the date in a column of data type date or datetime or timestamp or even as a number datatype (holding the unix timestamp) then you can sort by that column. but if you store the date as a regular string datatype, like varchar, blob, whatever, then it will just sort it alphabetically. Link to comment https://forums.phpfreaks.com/topic/9150-date-sort/#findComment-33695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.