time elapsed



I have a MySQL table with two timestamp fields, in MySQL's default format, e.g. 2008-02-28 10:33:51

How can I then compare the two in order to get the elapsed time between the two values? Does php (or MySQL) have any convenience functions to do that? Or do I have to start with strptime() and work it out from there?

Thanks again to everybody for all the replies.
.



Relevant Pages

  • Re: Ordering on Hierarchical Dot Notation
    ... recursion to compare at each level. ... >> I have a SQL database (MySql) containing a table with a key column which ... >> users still want to query the database using the natural representation. ... >> coded to sort in the desired order. ...
    (comp.lang.java.databases)
  • Re: Ordering on Hierarchical Dot Notation
    ... recursion to compare at each level. ... >> I have a SQL database (MySql) containing a table with a key column which ... >> users still want to query the database using the natural representation. ... >> coded to sort in the desired order. ...
    (comp.lang.java.programmer)
  • Re: ThinkSQL RDBMS restructured pricing
    ... > - ThinkSQL ... > - NexusDB ... > - MySQL ... Why not compare all of them to the free&fast Firebird database?? ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Date storage format
    ... I'm trying to teach myself some PHP and MySQL and the project that I've decided to build will be dependent on queries involving comparisons of dates. ... Create a/ timestamp/s for the date/s in question, store the timestamp and then compare to that. ... If the timestamp is the way to go, should that column be of type "Timestamp" or will that cause the string to be altered to a MySQL timestamp? ...
    (comp.lang.php)
  • Re: REQ How would I compare multiple date fields in one table to find the latest entry
    ... >> There are 15 rows for each record, each row accounts for a different type of outcome ... I'm looking for some kind of query that will compare ... I know that Mysql query order by will compare records on a specific date, ... arrays by matching key values. ...
    (comp.lang.php)