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

    Join Date
    Aug 2000
    Posts
    2
    Rep Power
    0
    Hi

    I'm retrieving a list of dates from MySQL using PHP, it is output as YYYY-MM-DD format.

    I need to output it in DD-MM-YYYY format.

    I looked at the date() function but it only seems to work with current date.

    What functions should i be investigating ?

    Thanks


    Gish
  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
    You should look at the date_format() function in MySQL.

    select date_format('format string',your_date_field) as fdate from table;

Similar Threads

  1. Php/Mysql date problems ?
    By Sukon in forum PHP Development
    Replies: 2
    Last Post: January 12th, 2004, 05:19 AM
  2. Date formatting
    By williamcrawley in forum ASP Programming
    Replies: 1
    Last Post: December 12th, 2003, 06:02 AM
  3. formatting date from mysql
    By ashabi in forum PHP Development
    Replies: 3
    Last Post: November 4th, 2003, 03:14 AM
  4. Formatting a MySQL date into PHP
    By Haakon in forum PHP Development
    Replies: 4
    Last Post: October 19th, 2003, 11:50 AM
  5. Time formatting without date() ??
    By etones in forum PHP Development
    Replies: 1
    Last Post: September 21st, 2003, 10:16 AM

IMN logo majestic logo threadwatch logo seochat tools logo