php-db | 2004071

[PHP-DB] Re: Storing Date in mysql From: Tim Van Wassenhove (euki <email protected>)
Date: 07/08/04

In article <20040708104445.7d42c400 <email protected>>, 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