php-db | 2004071
Date: 07/08/04
- Next message: Jensen, Kimberlee: "[PHP-DB] Web host offering beta versions?"
- Previous message: Lars Hilsebein: "AW: [PHP-DB] fetch row DISTINCT"
- In reply to: Michael Gale: "[PHP-DB] Storing Date in mysql"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Jensen, Kimberlee: "[PHP-DB] Web host offering beta versions?"
- Previous message: Lars Hilsebein: "AW: [PHP-DB] fetch row DISTINCT"
- In reply to: Michael Gale: "[PHP-DB] Storing Date in mysql"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

