Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A non well formed numeric value encountered

    When giving this:

    <?php echo date('jS F Y',$row_rsTrips['date']); ?>

    it outputs:

    A non well formed numeric value encountered in C:\wamp\www\admin\table_output.php on line 54

    1st January 1970

    The field type for the date value is set to "DATE" in the mysql database, what am I missing

    Thanks in advance

  • #2
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    The date() function expects a timestamp (integer) not a Date as the second parameter.
    John

  • #3
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,547
    Thanks
    57
    Thanked 148 Times in 147 Posts
    try
    PHP Code:
    echo date("jS F Y"strtotime($row_rsTrips["date"]));


    TEST:
    echo 
    date("jS F Y"strtotime("01/01/1970"))."<br />";
    echo 
    date("jS F Y"strtotime("1st Jan 1970"))."<br />";
    echo 
    date("jS F Y"strtotime("01 January 1970")); 
    All would output "1st January 1970"
    Last edited by Phil Jackson; 09-22-2009 at 06:35 PM.
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 


  •  

    Posting Permissions

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