SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: add time in php

  1. #1
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    time calculation

    how to calculate time in php?
    for example:
    if my stock production start at 2.45pm;
    and the duration to produce these stock is 350minutes;
    how to calculate the end time of this production and display in php format
    Last edited by mr saw; Dec 28, 2006 at 10:01.

  2. #2
    Non-Member
    Join Date
    Apr 2006
    Location
    Scotland
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $date1 '1445';
    $date2 '0130';

    $date $date1 $date2;
    $date strtotime($date); 


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
  •