Results 1 to 2 of 2
Thread: Funky date
Jun 15, 2001, 22:08 #1
I am using the PHP date function like this:
20010522 and in the database (MySQL) it is timestamp(8)
Jun 15, 2001, 22:26 #2
- Join Date
- Aug 2000
- San Diego, CA
- 0 Post(s)
- 0 Thread(s)
You'll need to use MySQL functions instead of PHP functions. date() takes a unix timestamp which is usually a number like 992670321 which is the number of seconds since the unix epoch or Jan 1, 1970.
You want to do this
$result = mysql_query("SELECT DATE_FORMAT(date, '%m/%d/%Y') as date from tablename");
Check out http://mysql.he.net/documentation/my...time_functions for more informationPlease don't PM me with questions.
Use the forums, that is what they are here for.