Reply to Re: Data format in application or database?

Your name:

Reply:


Posted by Tony Marston on 09/10/06 22:33

The best way to store a date is as a DATE datatype in YYYY-MM-DD format so
you can do comparisons between different dates. How you display them to the
user is another problem. I prefer not to format any dates until as late as
possible, just before I present them to the user.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

"turnitup" <same@same> wrote in message
news:45027de4$0$1377$da0feed9@news.zen.co.uk...
>I have found that by far the easiest way to store dates in my LAMP
>application is in a text string in the database in Unixtime format.
>
> First of all, what would be the most efficient data type to store this as?
>
> Secondly, in terms of translating into a human readable format, is it
> quicker to format the date in the application using date() or in the
> database in the select query?
>
> Any thoughts?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация