#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    1
    Rep Power
    0
    I have a mysql database and a vairable thedate of the type DATE.

    I search for a specific date, and when I try this:

    date("d-M-Y", $thedate)

    I get 31-Dec-1969, but $thedate is 1999-04-03.

    What coul dbe the problem? Thanks!

  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    The PHP function date uses a UNIX timestamp. You should use the various MySQL date functions to manipulate MySQL date/time datatypes. They're in the MySQL manual. Happy reading.

Similar Threads

  1. Check MySQL Version thru PHP
    By wolftrap1 in forum PHP Development
    Replies: 2
    Last Post: February 11th, 2004, 08:51 PM
  2. Replies: 5
    Last Post: February 11th, 2004, 02:18 AM
  3. Getting data from different tables in Mysql with PHP
    By Bosw8er in forum PHP Development
    Replies: 3
    Last Post: February 10th, 2004, 04:25 PM
  4. Replies: 0
    Last Post: January 30th, 2004, 01:22 PM
  5. PHP 5 (MYSQL vs. SQLite)
    By ignition in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 12:13 PM

IMN logo majestic logo threadwatch logo seochat tools logo