Re: Varchar "date" to real date?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You should better store your dates in unix timestamp, integer format and 
then display it on your web site with using date(), or smarty date_format 
function in any format you wish.

Sincerely,
Rosty Kerei <rosty.kerei@xxxxxxxxx>


""William Stokes"" <kalles@xxxxxxxxxxxxx> wrote in message 
news:66.02.28258.F3941B34@xxxxxxxxxxxxxxx
> Hello,
>
> This is propably a more of a MySQL question but here we go anyway...
>
> I have a DB that has dates stored in a table. The date field type is 
> Varchar (don't ask why... :( The dates are stored using european date 
> format DD.MM.YYYY. I need somehow convert the dates to the format MySQL 
> uses (YYYY-MM-DD) and re-store them to a table which has a real date 
> column for them.
>
> I think I need some help/ideas with this...
>
> If I can get this done how can I still display the dates in european 
> format at my web page? Do I have to break the date to pieces and some how 
> re-arrange it to the DD.MM.YYYY format or is the some clever function for 
> this that can automatically do this?
>
> Thanks
> -Will 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux