-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 31 January 2004 7:57 pm, Kenneth Letendre wrote:
> Hello,
>
>    I'm trying to get the difference (in days) between dates stored in two
> date fields.

You should be able to do this with the TO_DAYS() function, e.g.:

SELECT ID, (TO_DAYS(firstdate) - TO_DAYS(postdate)) AS diff FROM calendar


Cheers

David P



- -- 
David Precious
[EMAIL PROTECTED]
http://www.preshweb.co.uk

Early to rise and early to bed makes a man healthy and socially dead




All emails PGP signed - PGP key at:
http://www.preshweb.co.uk/aboutme/keys.php

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE//MWHn5YXkShpEpcRAqgcAJ4sqcG9jpe9Ds4InqkwVHHXyNq0xgCfRs5q
hf0pBHGnvwYrn6RQKlgH3UM=
=X6La
-----END PGP SIGNATURE-----


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to