Advertisement

01.29.2008 at 11:04AM PST, ID: 23120411
[x]
Attachment Details

Convert mysql date to days hours minutes seconds

Asked by revo1059 in MySQL, PHP Scripting Language

Tags: PHP, NA

I have this query:

SELECT timediff(stop_time,start_time) as total from `work`;
which gives me this

239:53:36

where 239 is hours, 53 is minutes and 36 is seconds.

Instead, I want it to 9 days 5 hours, 53 minutes etc

I could either do this from mysql or php, though i would prefer to do it from mysql.

I have mysql version 5.0.11 running on suse sles 9Start Free Trial
[+][-]01.29.2008 at 11:35AM PST, ID: 20771293

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.29.2008 at 11:39AM PST, ID: 20771344

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.29.2008 at 12:15PM PST, ID: 20771730

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.29.2008 at 01:22PM PST, ID: 20772422

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL, PHP Scripting Language
Tags: PHP, NA
Sign Up Now!
Solution Provided By: darron_chapman
Participating Experts: 1
Solution Grade: A
 
 
[+][-]01.30.2008 at 05:55AM PST, ID: 20776971

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628