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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/9150-date-sort/#findComment-33695 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.