You can look up DATE_SUB in the manual for starters and combine them with
other functions in the same section, to get what you want.

----- Original Message -----
From: "Laercio Brehmer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 17, 2001 4:06
Subject: Difference of two datetime fields.


> Hello,
> How could I obtain the difference of two datetime fields giving the result
> in seconds, like the function datediff in MSsql ?
> I tried date_sub but I had no success.
> Ex:  2001-02-16 15:00:00 - 2001-02-16 14:00:00    =    3600 seconds
>
> Thanks,
>
> Laercio Brehmer
> CIASC
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> 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


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