Results 1 to 4 of 4

Thread: php clock in

  1. #1
    Join Date
    Sep 2013

    php clock in

    presently am dng Staff management prjt...

    how to insert clock in and out times in database...
    how can i calculate timesheet difference .....!

    any one give an idea...

    thanks in advance.....

  2. #2
    Join Date
    Aug 2004
    Use a timestamp or datetime type column in the database, and use the database's built-in time arithmetic functions to get the difference. E.g., in MySQL, you might use the TIMEDIFF() function.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Sep 2013
    actually my problem is in front end

    when i click the clock in button ... it display the current time... (that code be writen in jas)
    your clock in time is....... like ths

    i want to insert that clock in time in database...
    how can i insert that time...
    please help me...

    thanks in advance..

  4. #4
    Join Date
    Sep 2013
    Try this one.

    You can first display the date and then save the same in the database.
    If the table definition has the timestamp column default set to CURRENT_TIMESTAMP, you actually don't have to do anything at all. Otherwise, NOW() and CURRENT_TIMESTAMP will work, as in:

    INSERT INTO t1 (timestamp_column) VALUES (NOW());

    Hope this helps you.
    strad solutionswww.stradsolutions.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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