You are here: Re: Storing Dates in DB « PHP Programming Language « IT news, forums, messages
Re: Storing Dates in DB

Posted by Ray on 06/16/05 13:40

Hi

The best way that I found is to use
$date = date("Y-m-d H:i:s");

Works with mysql within a datetime field..
For a date field use date("Y-m-d") and for a time field use date("H:i:s")

Regards
Ray



"Angelos" <angelos@redcatmedia.net> wrote in message
news:d8rjp6$564$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
> What do you think is the best way to store Dates into a database ?
> If you want to keep logs or buckups....
>
> I am using date('dmYHis')
> but I doesn't work really well ...
> Is it better to use date(U) ?
>
> Any suggestions ?
>
> And if you can let me know how you can Display that date back in the
> Screen !
>
> Thanks
>

 

Navigation:

[Reply to this 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

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