SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Date And Time Format

    Needing some help with Date,time format using the following code which gives me this format.

    01.06.2002 05:57 PM

    Need help with 2 things if possible, first would like to spell out Month instead of just a number and second how would I change it to a 24 hour clock instead of a 12 hour clock.

    PHP Code:
    <?php echo date ("m.d.Y h:i A");?>
    Any help would be appreciated.

    Thx
    Rad

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    from the PHP manual for date():

    • F - month, textual, long; i.e. "January"
    • M - month, textual, 3 letters; i.e. "Jan"
    • g - hour, 12-hour format without leading zeros; i.e. "1" to "12"
    • h - hour, 12-hour format; i.e. "01" to "12"


    there ya go.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


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
  •