Re: Storing Date in mysql

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

 



In article <20040708104445.7d42c400@xxxxxxxxxxxxxxxxxxxxx>, Michael Gale wrote:
> Hello,
> 
> 	I need to store the date of record / entry in the mysql database, so I have the following table create statement:
>   `token_date` varchar(100) NOT NULL default '',

Why don't you use a date format that your database supports? If i'm not
mistaken: timestamp, date, datetime...  With from_unix function you can
convert unix timestamps to mysql timestamps. And with date_format
function you can format the timestamp to whatever you like. And you get
some functions to calculatie differences between timestamps etc... 


-- 
Tim Van Wassenhove <http://home.mysth.be/~timvw>

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux