On Thu, 8 Feb 2001, Quickling wrote:

> Date: Thu, 08 Feb 2001 17:02:59 -0500
> From: Quickling <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: MySQL vs Access; you'd *think* the choice is obvious...
> 
> Hi,
> 
> Question 2:
> ---------------
> Is there any way in MySQL to compute, inline SQL, the difference between 
> two datetime values?  I couldn't find a function which could do anything 
> but subtract intervals from datetimes...  what I need is the interval!
Try converting both to seconds using UNIXTIME and then subtract the 
converted result.  

Second option, form the target datetime in YYYYMMDDHHMMSS format and do a 
straight comparison (assuming that the target comes from a program).

> 
> 
> Many thanks in advance,
> 
> Jesse
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to