Stooney Posted August 20, 2008 Share Posted August 20, 2008 What is the most common (and preferred) date format? I'm trying to decide unix time, mysql date format, etc. The date is used for storing register date, birthday, last action. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/ Share on other sites More sharing options...
akitchin Posted August 20, 2008 Share Posted August 20, 2008 if you're using MySQL, there's no reason to use anything other than the DATE field type. MySQL has a plethora of functions to manipulate the date as necessary. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-620817 Share on other sites More sharing options...
zq29 Posted August 20, 2008 Share Posted August 20, 2008 I always use the MySQL DATE format (YYYY-MM-DD) when storing dates. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-620959 Share on other sites More sharing options...
ardyandkari Posted August 20, 2008 Share Posted August 20, 2008 i use mysql date format (yyyy-mm-dd) and then if i want to rearrange the numbers i split it. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-621011 Share on other sites More sharing options...
jcombs_31 Posted August 20, 2008 Share Posted August 20, 2008 I agree, you can always format the date differently for display purposes. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-621070 Share on other sites More sharing options...
Daniel0 Posted August 20, 2008 Share Posted August 20, 2008 ISO 8601 Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-621120 Share on other sites More sharing options...
JonnoTheDev Posted August 20, 2008 Share Posted August 20, 2008 Depends on the target country of the website. In the UK we use dd-mm-yyyy. You could have dynamic date formatting dependent on the users location. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-621132 Share on other sites More sharing options...
akitchin Posted August 20, 2008 Share Posted August 20, 2008 Depends on the target country of the website. In the UK we use dd-mm-yyyy. You could have dynamic date formatting dependent on the users location. or use MySQL's DATE format, then use DATE_FORMAT() when outputting it. which is precisely why one would probably want to use this format in the first place. Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-621134 Share on other sites More sharing options...
Daniel0 Posted August 20, 2008 Share Posted August 20, 2008 Depends on the target country of the website. In the UK we use dd-mm-yyyy. You could have dynamic date formatting dependent on the users location. That's why you should use ISO standards. International Organization for Standardization... Quote Link to comment https://forums.phpfreaks.com/topic/120475-standard-date-format/#findComment-621135 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.