Results 1 to 4 of 4

Thread: Date function in php including milliseconds

  1. #1
    Join Date
    May 2008
    Posts
    26

    Date function in php including milliseconds

    Hi,

    I want to know about the PHP function for date that will show me milliseconds?
    I want to show Day-Month-Year Hours-Minutes-Seconds-Milliseconds
    Can you please help me with this?

  2. #2
    Join Date
    Aug 2008
    Posts
    281

    Re: Date function in php including milliseconds

    Hi,

    For PHP date function you must go through these previous topics.

    1. MySQL date & time function.
    And
    2. Date function in PHP

    I hope this will help you, Ill try to find & answer you for showing millisecond too.

  3. #3
    Join Date
    May 2008
    Posts
    20

    Re: Date function in php including milliseconds

    Hi,

    If you want to show milliseconds, then first you need to get the microtime,
    Now add the values & multiply it by 1000.
    Do as follows

    Code:
    list( $msecs, $uts ) = split( ' ', microtime());
    echo floor(($uts+$msecs)*1000);
    I hope this helps you!

  4. #4
    Join Date
    Aug 2008
    Posts
    281

    Re: Date function in php including milliseconds

    If you want to go for detail information on PHP date function & milliseconds.
    Please refer the PHP site.
    http://in.php.net/microtime

Similar Threads

  1. Sql query for Date function.
    By horuy in forum Software Development
    Replies: 3
    Last Post: 17-11-2010, 12:22 AM
  2. Discussion of Date and Time function
    By Gerri in forum Software Development
    Replies: 3
    Last Post: 29-01-2010, 12:03 PM
  3. MySQL date & time function.
    By Amaresh in forum Software Development
    Replies: 2
    Last Post: 19-06-2009, 02:49 PM
  4. Date function in PHP
    By RobertoOrtiz in forum Software Development
    Replies: 2
    Last Post: 05-05-2009, 07:54 PM
  5. Problem with Php date function
    By HAMAKO in forum Software Development
    Replies: 1
    Last Post: 21-04-2009, 12:38 PM

Tags for this Thread

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
  •  
Page generated in 1,751,717,709.77627 seconds with 16 queries