List:General Discussion« Previous MessageNext Message »
From:Graeme B. Davis Date:April 2 1999 4:14pm
Subject:Re: MySQL/DBI problem
View as plain text  
Thanks for the quick reply!

Is there any function in MySQL to convert x seconds to DD HH:MM:SS format?

-graeme

>>I don't think I can subtract a DATETIME value from another for some
reason.
>>The manual says it's supposed to be in the format of DAYS H:M:S
>
>Sorry, I think I misread your question. I usually just convert to
>UNIX_TIMESTAMP, subtract, and get a result in seconds. You can convert
>this back to HH:MM:SS with MySQL functions (SEC_TO_TIME) if you like,
>or use:
>
>HH= t / 3600; t -= HH * 3600;
>MM= t /60; t -= MM * 60;
>SS=t;


Thread
MySQL/DBI problemJ Irwin2 Apr
Re: MySQL/DBI problemGraeme B. Davis2 Apr
Re: MySQL/DBI problemFred Lindberg2 Apr
Re: MySQL/DBI problemGraeme B. Davis2 Apr
Re: MySQL/DBI problemFred Lindberg2 Apr
Re: MySQL/DBI problemGraeme B. Davis2 Apr