jb22b4 Posted July 25, 2009 Share Posted July 25, 2009 I need to store dates and be able to order by date. How should I accommodate a situation where the user only knows part of the date, like only the year, or only the month? Thanks for the help, Justin Quote Link to comment https://forums.phpfreaks.com/topic/167428-solved-best-way-to-store-dates-when-you-dont-always-have-a-complete-date/ Share on other sites More sharing options...
.josh Posted July 25, 2009 Share Posted July 25, 2009 In that case I'd store as a delimited string, or else have a separate column for each part of the date. Quote Link to comment https://forums.phpfreaks.com/topic/167428-solved-best-way-to-store-dates-when-you-dont-always-have-a-complete-date/#findComment-882868 Share on other sites More sharing options...
fenway Posted August 3, 2009 Share Posted August 3, 2009 In that case I'd store as a delimited string, or else have a separate column for each part of the date. FYI, MySQL has no problem storing partial dates. Quote Link to comment https://forums.phpfreaks.com/topic/167428-solved-best-way-to-store-dates-when-you-dont-always-have-a-complete-date/#findComment-889921 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.