Thread: TIME in php

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    TIME in php


    i need help..in doing a project scheduling system.. i use this format M 0700-0900 how can i compare this to the current time save on my database? how can i convert this time to hour:minutes:seconds???? please help me
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,122
    Rep Power
    9398
    Since you haven't really explained your problem or in fact given us anything useful to help you with, I'll say:

    HHMM is date("Hi") in PHP and DATE_FORMAT(NOW(), "%H%i") in MySQL.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    php time


    actually i need an example to check if two time is conflict with each other.. for example my start time is 7:30 and end time is 10:30... then the next item will be 10:00 - 12:00 so i must be conflict ..because of the end time of 10:30 and the start time of 10:00

IMN logo majestic logo threadwatch logo seochat tools logo