The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: date format...PLS HELP

  1. #1
    Registered User

    Afrostyle date format...PLS HELP

    Hi all,

    I've been trying to change the date format of my website for a long time nowand nothing seems to work. I've tried to change it on MySQL but I'm not getting it right.

    here is the line of code I'm using to call the date from the database:
    <?php echo $row_rs_nw['date'];?>
    what I need is to change the format from yyyy/mm/dd to mm/dd/yyyy....

    PLS HELP!!! thanks for the attention!!

  2. #2
    I usually store my dates in MySQL as Unix timestamp, so I'd do:

    PHP Code:
    echo date('m/d/Y'$row_rs_nw['date']); 
    But you're storing your date as some other weird format so, try:

    PHP Code:
    echo substr($row_rs_nw['date'], 52) . '/' 
    substr($row_rs_nw['date'], 82) . '/' 
    substr($row_rs_nw['date'], 04); 
    Last edited by NeoDreamer; August 13th, 2009 at 01:01 AM.

  3. #3
    Registered User
    Thank u!!!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012