SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    proble with date formatting

    Hi guys, this is the value I inserted on a field with a column type of datetime - 2009-06-04 02:55:38 when I format it date("F j, Y g:i A",$visitdate), the output is January 1, 1970 12:33 AM. I don't know what makes it wrong. Please help me.

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sirGE View Post
    Hi guys, this is the value I inserted on a field with a column type of datetime - 2009-06-04 02:55:38 when I format it date("F j, Y g:i A",$visitdate), the output is January 1, 1970 12:33 AM. I don't know what makes it wrong. Please help me.
    PHP Code:
    $visitdate '2009-06-04 02:55:38';
    echo 
    date('F j, Y g:i A'strtotime($visitdate)); 
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #3
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okey. thank a lot.


Bookmarks

Posting Permissions

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