Results 1 to 2 of 2

Thread: please help a novice php/mysql date format

  1. #1
    Join Date
    Nov 2005
    Posts
    1

    please help a novice php/mysql date format

    I need to change the date and time format generated by the results of an mysql query to display differently on my web page. Please help! I think that I need to write a function but don't know how or where to put it in the code. I am very new to this.
    $query_Recordset1 = "SELECT tblvenuebooking.timebookedfor,.datebookedfor,
    WHERE tblvenuebooking.datebookedfor >=NOW();
    $Recordset1 = mysql_query($query_Recordset1, $book) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    /* HTML Block*/Table design with Date & Time
    End php
    Start php do {
    echo tr
    echo $row_Recordset1['datebookedfor'] ;
    echo $row_Recordset1['timebookedfor'];
    } while ( $row_Recordset1 = mysql_fetch_assoc($Recordset1) );

    echo 'table';
    echo "<p>$totalRows_Recordset1 Records Total./p>";
    end php end html
    Last edited by joejoe1; 11-20-2005 at 10:14 AM.

  2. #2
    Join Date
    Dec 2005
    Posts
    1

    php/mysql date format

    Take a look at the php date() function. http://us2.php.net/date

    I don't have any of my code at home but I'll check back tomorrow and if you need a better example I'll provide one.


    I hope that helps.

    Nate

Posting Permissions

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