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 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date/Time Format

    i want my date/time format to be a normal format... ex. 1-11-2006 9:20pm..

    it comes out for me like 2006-1-11 21:00:30


    code i have is... how could i have it so it displays it normally...

    Code:
    <?php echo $filelist_array["date"]; ?>
    "Help me, Help you"

    KnastyDotCom - 100% Original Videos and Pictures and more!

  • #2
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    PHP Code:
    $date '2006-1-11 21:00:30';
    echo 
    date('n-d-Y g:ia'strtotime($date)); 

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i dont want to have date = to a specified ammount... it changes everytime i add new material to my site
    "Help me, Help you"

    KnastyDotCom - 100% Original Videos and Pictures and more!

  • #4
    New Coder
    Join Date
    Dec 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    from this code this is the output i get: 12-31-1969 6:59pm

    Code:
    <?php $date = '$filelist_array["date"]';
    echo date('n-d-Y g:ia', strtotime($date));  ?>
    "Help me, Help you"

    KnastyDotCom - 100% Original Videos and Pictures and more!

  • #5
    Regular Coder devinemke's Avatar
    Join Date
    Dec 2004
    Location
    NYC
    Posts
    443
    Thanks
    0
    Thanked 12 Times in 11 Posts
    PHP Code:
    echo date('n-d-Y g:ia'strtotime($filelist_array['date'])); 

  • #6
    New Coder
    Join Date
    Dec 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I fricken love you man...


    Thanks alot it works
    "Help me, Help you"

    KnastyDotCom - 100% Original Videos and Pictures and more!


  •  

    Posting Permissions

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