List:General Discussion« Previous MessageNext Message »
From:Fred Lindberg Date:April 2 1999 4:00pm
Subject:Re: MySQL/DBI problem
View as plain text  
On Fri, 2 Apr 1999 10:52:31 -0500, Graeme B. Davis wrote:

>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;


-Sincerely, Fred

(Frederik Lindberg, Infectious Diseases, WashU, St. Louis, MO, USA)


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